From e1ecfa5fd47fe812b754c9b9e25217f4d06f20b9 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 24 Oct 2017 15:59:04 +0200 Subject: [PATCH] check_postfix.sh: add 'systemctl 'daemon reload' befor restarting postfix service. Its a workaround! --- check_postfix.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check_postfix.sh b/check_postfix.sh index 33472a5..62dd085 100755 --- a/check_postfix.sh +++ b/check_postfix.sh @@ -114,6 +114,11 @@ if ! ps -e f | grep -E "[[:digit:]]\ ${check_string_ps}" | grep -v grep > /dev/n error "Postfix Mailservice seems to be down! Trying to restart service now.." if $systemd_supported ; then + $systemctl daemon-reload > /dev/null 2> ${LOCK_DIR}/err_msg.log + if [[ $? -ne 0 ]]; then + error "$(cat ${LOCK_DIR}/err_msg.log)" + fi + sleep 2 $systemctl stop postfix > /dev/null 2> ${LOCK_DIR}/err_msg.log if [[ $? -ne 0 ]]; then error "$(cat ${LOCK_DIR}/err_msg.log)"