diff options
Diffstat (limited to 'system/syslog-ng/rc.syslog-ng')
-rw-r--r-- | system/syslog-ng/rc.syslog-ng | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/system/syslog-ng/rc.syslog-ng b/system/syslog-ng/rc.syslog-ng index 1d5511b648173..61f4a2beee591 100644 --- a/system/syslog-ng/rc.syslog-ng +++ b/system/syslog-ng/rc.syslog-ng @@ -1,8 +1,8 @@ #!/bin/sh -# Start/stop/restart the syslog-ng daemon. -# Specially tailored to emulate Slackware's stock syslogd/klogd. # -# Written by mario <mario@slackverse.org>. +# Start/stop/restart the syslog-ng daemon +# Drop-in replacement for a stock Slackware rc.syslog script +# Written by Mario Preksavec <mario@slackware.hr> syslog_start() { if [ -x /usr/sbin/syslog-ng ]; then @@ -14,9 +14,9 @@ syslog_start() { echo "Starting syslog-ng daemon: /usr/sbin/syslog-ng" /usr/sbin/syslog-ng -R /var/lib/syslog-ng/syslog-ng.persist - # Create a fake syslogd.pid file for rc.M + # Link syslogd.pid for compatibility with other rc scripts if [ -f /var/run/syslog-ng.pid ] && kill -0 $(cat /var/run/syslog-ng.pid) 2> /dev/null; then - cp -a /var/run/syslog-ng.pid /var/run/syslogd.pid + ln -sf /var/run/syslog-ng.pid /var/run/syslogd.pid fi fi } @@ -25,8 +25,8 @@ syslog_stop() { if [ -f /var/run/syslog-ng.pid ]; then echo "Stopping syslog-ng daemon" kill $(cat /var/run/syslog-ng.pid) 2> /dev/null && rm -f /var/run/syslog-ng.pid - # Remove a fake pid file - rm -f /var/run/syslogd.pid + # Unlink syslogd.pid + unlink /var/run/syslogd.pid fi killall syslog-ng 2> /dev/null } |