From c8fe6681e9d9e7aa3746329dd2ee6bf637ef6829 Mon Sep 17 00:00:00 2001 From: kamuri Date: Sat, 7 Oct 2017 20:49:05 +0200 Subject: [PATCH] change chksum start --- target/check_for_changes.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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