Fix changedetector restart loop (#2548)
* only restart changedetector, if exit is unexpected. * prevent supervisord from restarting changedetector on error --> endless loop * add quotes
This commit is contained in:
parent
de61d42e68
commit
cbcc3823d3
|
@ -24,19 +24,19 @@ _obtain_hostname_and_domainname
|
||||||
|
|
||||||
if ! cd /tmp/docker-mailserver &>/dev/null
|
if ! cd /tmp/docker-mailserver &>/dev/null
|
||||||
then
|
then
|
||||||
_exit_with_error "Could not change into '/tmp/docker-mailserver/' directory"
|
_exit_with_error "Could not change into '/tmp/docker-mailserver/' directory" 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check postfix-accounts.cf exist else break
|
# check postfix-accounts.cf exist else break
|
||||||
if [[ ! -f postfix-accounts.cf ]]
|
if [[ ! -f postfix-accounts.cf ]]
|
||||||
then
|
then
|
||||||
_exit_with_error "'/tmp/docker-mailserver/postfix-accounts.cf' is missing"
|
_exit_with_error "'/tmp/docker-mailserver/postfix-accounts.cf' is missing" 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# verify checksum file exists; must be prepared by start-mailserver.sh
|
# verify checksum file exists; must be prepared by start-mailserver.sh
|
||||||
if [[ ! -f ${CHKSUM_FILE} ]]
|
if [[ ! -f ${CHKSUM_FILE} ]]
|
||||||
then
|
then
|
||||||
_exit_with_error "'/tmp/docker-mailserver/${CHKSUM_FILE}' is missing"
|
_exit_with_error "'/tmp/docker-mailserver/${CHKSUM_FILE}' is missing" 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REGEX_NEVER_MATCH="(?\!)"
|
REGEX_NEVER_MATCH="(?\!)"
|
||||||
|
|
|
@ -10,7 +10,7 @@ function _exit_with_error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_log 'error' 'Aborting'
|
_log 'error' 'Aborting'
|
||||||
exit 1
|
exit "${2:-1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# `dms_panic` methods are appropriate when the type of error is a not recoverable,
|
# `dms_panic` methods are appropriate when the type of error is a not recoverable,
|
||||||
|
|
|
@ -119,7 +119,6 @@ command=/usr/local/bin/postfix-wrapper.sh
|
||||||
startsecs=0
|
startsecs=0
|
||||||
stopwaitsecs=55
|
stopwaitsecs=55
|
||||||
autostart=false
|
autostart=false
|
||||||
autorestart=true
|
|
||||||
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
||||||
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
||||||
command=/usr/local/bin/check-for-changes.sh
|
command=/usr/local/bin/check-for-changes.sh
|
||||||
|
|
Loading…
Reference in New Issue