[Watchdog] Force timeout on smtp-cli, kill watchdog.sh on reload

master
andryyy 2019-08-11 10:18:00 +02:00
parent edfb862557
commit 6aa7664d79
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 3 additions and 2 deletions

View File

@ -76,7 +76,7 @@ function mail_error() {
return 1 return 1
fi fi
[ -f "/tmp/${1}" ] && BODY="/tmp/${1}" [ -f "/tmp/${1}" ] && BODY="/tmp/${1}"
./smtp-cli --missing-modules-ok \ timeout 10s ./smtp-cli --missing-modules-ok \
--charset=UTF-8 \ --charset=UTF-8 \
--subject="${SUBJECT}" \ --subject="${SUBJECT}" \
--body-plain="${BODY}" \ --body-plain="${BODY}" \
@ -539,6 +539,7 @@ fi
touch /tmp/watchdog_reload touch /tmp/watchdog_reload
sleep 86400 sleep 86400
echo "Reloading watchdog" echo "Reloading watchdog"
killall watchdog
kill 1 kill 1
) & ) &

View File

@ -366,7 +366,7 @@ services:
- /lib/modules:/lib/modules:ro - /lib/modules:/lib/modules:ro
watchdog-mailcow: watchdog-mailcow:
image: mailcow/watchdog:1.54 image: mailcow/watchdog:1.55
# Debug # Debug
#command: /watchdog.sh #command: /watchdog.sh
build: ./data/Dockerfiles/watchdog build: ./data/Dockerfiles/watchdog