check_postfix.sh: add 'systemctl 'daemon reload' befor restarting postfix service. Its a workaround!
This commit is contained in:
parent
1bde6f91bc
commit
e1ecfa5fd4
@ -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.."
|
error "Postfix Mailservice seems to be down! Trying to restart service now.."
|
||||||
|
|
||||||
if $systemd_supported ; then
|
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
|
$systemctl stop postfix > /dev/null 2> ${LOCK_DIR}/err_msg.log
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
error "$(cat ${LOCK_DIR}/err_msg.log)"
|
error "$(cat ${LOCK_DIR}/err_msg.log)"
|
||||||
|
Loading…
Reference in New Issue
Block a user