change chksum start

This commit is contained in:
kamuri 2017-10-07 20:49:05 +02:00
parent 6ab23cc562
commit c8fe6681e9
1 changed files with 5 additions and 3 deletions

View File

@ -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