summaryrefslogtreecommitdiff
path: root/system/syslog-ng/rc.syslog-ng
diff options
context:
space:
mode:
authorMario Preksavec <mario@slackware.hr>2013-12-12 00:08:58 +0700
committerErik Hanson <erik@slackbuilds.org>2013-12-14 10:53:03 -0600
commit7ec156eccdd442461d08b4f701532a04031f4f01 (patch)
treeccc18fae24234be82d8d0dcfc96ea08b74a68c9f /system/syslog-ng/rc.syslog-ng
parent05d5d1ca13b1c89f103d963e6cb3d8ae40f23bf3 (diff)
downloadslackbuilds-7ec156eccdd442461d08b4f701532a04031f4f01.tar.gz
system/syslog-ng: Updated for version 3.5.2.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/syslog-ng/rc.syslog-ng')
-rw-r--r--system/syslog-ng/rc.syslog-ng14
1 files changed, 7 insertions, 7 deletions
diff --git a/system/syslog-ng/rc.syslog-ng b/system/syslog-ng/rc.syslog-ng
index 1d5511b648..61f4a2beee 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
}