diff --git a/image/services/syslog-ng/syslog-ng.init b/image/services/syslog-ng/syslog-ng.init index 04f526b..8a33b78 100755 --- a/image/services/syslog-ng/syslog-ng.init +++ b/image/services/syslog-ng/syslog-ng.init @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -em # If /dev/log is either a named pipe or it was placed there accidentally, # e.g. because of the issue documented at https://github.com/phusion/baseimage-docker/pull/25, diff --git a/image/services/syslog-ng/syslog-ng.shutdown b/image/services/syslog-ng/syslog-ng.shutdown index 0288004..7046d02 100755 --- a/image/services/syslog-ng/syslog-ng.shutdown +++ b/image/services/syslog-ng/syslog-ng.shutdown @@ -20,5 +20,8 @@ syslogng_wait() { return $RET } -kill $(cat "$PIDFILE") +if [ -f "$PIDFILE" ]; then + kill $(cat "$PIDFILE") +fi + syslogng_wait 0 $?