change chksum start
This commit is contained in:
parent
6ab23cc562
commit
c8fe6681e9
|
@ -2,9 +2,6 @@
|
|||
while true; do
|
||||
|
||||
cd /tmp/docker-mailserver
|
||||
chksum=$(sha512sum -c chksum)
|
||||
resu_acc=${chksum:21:2}
|
||||
resu_vir=${chksum:44:2}
|
||||
|
||||
# Check postfix-virtual.cf exist else break
|
||||
if [ ! -f postfix-virtual.cf ]; then
|
||||
|
@ -23,6 +20,11 @@ if [ ! -f chksum ]; then
|
|||
sha512sum --tag postfix-accounts.cf --tag postfix-virtual.cf > chksum
|
||||
fi
|
||||
|
||||
# Get chksum and check it.
|
||||
chksum=$(sha512sum -c chksum)
|
||||
resu_acc=${chksum:21:2}
|
||||
resu_vir=${chksum:44:2}
|
||||
|
||||
if ! [ $resu_acc = "OK" ] || ! [ $resu_vir = "OK" ]; then
|
||||
echo "CHANGE DETECT"
|
||||
echo -n > /etc/postfix/vmailbox
|
||||
|
|
Loading…
Reference in New Issue