diff --git a/target/check_for_changes.sh b/target/check_for_changes.sh index 79f0b505..6023ddb2 100755 --- a/target/check_for_changes.sh +++ b/target/check_for_changes.sh @@ -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