From 6aa7664d7970415e959e2fb33b6c37b774b99f8c Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 11 Aug 2019 10:18:00 +0200 Subject: [PATCH] [Watchdog] Force timeout on smtp-cli, kill watchdog.sh on reload --- data/Dockerfiles/watchdog/watchdog.sh | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/watchdog/watchdog.sh b/data/Dockerfiles/watchdog/watchdog.sh index 8dc81af6..80141fb5 100755 --- a/data/Dockerfiles/watchdog/watchdog.sh +++ b/data/Dockerfiles/watchdog/watchdog.sh @@ -76,7 +76,7 @@ function mail_error() { return 1 fi [ -f "/tmp/${1}" ] && BODY="/tmp/${1}" - ./smtp-cli --missing-modules-ok \ + timeout 10s ./smtp-cli --missing-modules-ok \ --charset=UTF-8 \ --subject="${SUBJECT}" \ --body-plain="${BODY}" \ @@ -539,6 +539,7 @@ fi touch /tmp/watchdog_reload sleep 86400 echo "Reloading watchdog" + killall watchdog kill 1 ) & diff --git a/docker-compose.yml b/docker-compose.yml index 409bfcff..73c64ef3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -366,7 +366,7 @@ services: - /lib/modules:/lib/modules:ro watchdog-mailcow: - image: mailcow/watchdog:1.54 + image: mailcow/watchdog:1.55 # Debug #command: /watchdog.sh build: ./data/Dockerfiles/watchdog