[Watchdog] Retry to get current ACME log status, if empty (may fix watchdog mails on very busy servers - eg while running a backup)

master
andryyy 2019-12-28 11:37:04 +01:00
parent 196c327215
commit 9e11ab1fd4
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 6 additions and 2 deletions

View File

@ -476,7 +476,11 @@ acme_checks() {
while [ ${err_count} -lt ${THRESHOLD} ]; do
err_c_cur=${err_count}
ACME_LOG_STATUS_PREV=${ACME_LOG_STATUS}
ACME_LOG_STATUS=$(redis-cli -h redis GET ACME_FAIL_TIME)
ACME_LC=0
until [[ ! -z ${ACME_LOG_STATUS} ]] || [ ${ACME_LC} -ge 3 ]; do
ACME_LOG_STATUS=$(redis-cli -h redis GET ACME_FAIL_TIME 2> /dev/null)
ACME_LC=$((ACME_LC+1))
done
if [[ ${ACME_LOG_STATUS_PREV} != ${ACME_LOG_STATUS} ]]; then
err_count=$(( ${err_count} + 1 ))
fi

View File

@ -365,7 +365,7 @@ services:
- /lib/modules:/lib/modules:ro
watchdog-mailcow:
image: mailcow/watchdog:1.65
image: mailcow/watchdog:1.66
# Debug
#command: /watchdog.sh
dns: