[Dovecot] Various fixes for imapsync_cron, new imapsync version

This commit is contained in:
André
2018-07-27 22:19:14 +02:00
parent 5cc09055a7
commit 1115b826f9
4 changed files with 1714 additions and 795 deletions

View File

@@ -136,6 +136,7 @@ touch /etc/crontab /etc/cron.*/*
[[ -f /usr/local/var/run/dovecot/master.pid ]] && rm /usr/local/var/run/dovecot/master.pid
# Clean stopped imapsync jobs
rm -f /tmp/imapsync_busy.lock
IMAPSYNC_TABLE=$(mysql -h mysql-mailcow -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SHOW TABLES LIKE 'imapsync'" -Bs)
[[ ! -z ${IMAPSYNC_TABLE} ]] && mysql -h mysql-mailcow -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "UPDATE imapsync SET is_running='0'"