aboutsummaryrefslogtreecommitdiff
path: root/package/rsyslog/S01logging
diff options
context:
space:
mode:
authorGravatar Gustavo Zacarias <gustavo@zacarias.com.ar>2015-01-13 20:16:58 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-01-14 20:26:25 +0100
commit3f74996c1e168f5ab910033e5f7f3039e3831d58 (patch)
treed2e5ab26c2ea4923f1a842266bd1df724f87ea85 /package/rsyslog/S01logging
parentd4d05d7626b7a02ce870fb3964c6bcf682c21812 (diff)
downloadbuildroot-3f74996c1e168f5ab910033e5f7f3039e3831d58.tar.gz
buildroot-3f74996c1e168f5ab910033e5f7f3039e3831d58.tar.bz2
rsyslog: rename sysv initscript to S01logging
Do it to avoid having duplicate and conflicting functionality with busybox's S01logging. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/rsyslog/S01logging')
-rw-r--r--package/rsyslog/S01logging38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/rsyslog/S01logging b/package/rsyslog/S01logging
new file mode 100644
index 0000000000..0c4bbc7325
--- /dev/null
+++ b/package/rsyslog/S01logging
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Starts rsyslog.
+#
+
+start() {
+ echo -n "Starting rsyslog daemon: "
+ umask 077
+ start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
+ echo "OK"
+}
+stop() {
+ echo -n "Stopping rsyslog daemon: "
+ start-stop-daemon -K -q -p /var/run/rsyslogd.pid
+ echo "OK"
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+