1
0
mirror of https://github.com/phusion/baseimage-docker.git synced 2026-03-26 12:29:07 +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:
Ryan Sundberg
2017-07-01 15:08:08 -07:00
parent b57f08c71f
commit a6bf447f9e
4 changed files with 15 additions and 34 deletions

View File

@@ -7,8 +7,8 @@ SYSLOG_NG_BUILD_PATH=/bd_build/services/syslog-ng
## Install a syslog daemon.
$minimal_apt_get_install syslog-ng-core
mkdir /etc/service/syslog-ng
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.runit /etc/service/syslog-ng/run
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.init /etc/my_init.d/syslog-ng.init
cp $SYSLOG_NG_BUILD_PATH/syslog-ng.shutdown /etc/my_init.post_shutdown.d/syslog-ng.shutdown
mkdir -p /var/lib/syslog-ng
cp $SYSLOG_NG_BUILD_PATH/syslog_ng_default /etc/default/syslog-ng
touch /var/log/syslog