mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-03-26 04:18:46 +00:00
Start syslog-ng before runit, and stop after runit.
When syslog-ng is managed as an runit service, application logs may be lost during shutdown, when the syslog-ng service stops before the app exits. This change uses the my_init.d directory to manage syslog-ng at a lower runlevel than runit.
This commit is contained in:
10
image/services/syslog-ng/syslog-ng.init
Executable file
10
image/services/syslog-ng/syslog-ng.init
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# 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,
|
||||
# then we remove it.
|
||||
if [ ! -S /dev/log ]; then rm -f /dev/log; fi
|
||||
if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
|
||||
|
||||
/etc/init.d/syslog-ng start
|
||||
Reference in New Issue
Block a user