summaryrefslogtreecommitdiff
path: root/package/rsyslog/S01rsyslog
diff options
context:
space:
mode:
Diffstat (limited to 'package/rsyslog/S01rsyslog')
-rw-r--r--package/rsyslog/S01rsyslog38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/rsyslog/S01rsyslog b/package/rsyslog/S01rsyslog
new file mode 100644
index 000000000..8c28e02f5
--- /dev/null
+++ b/package/rsyslog/S01rsyslog
@@ -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 $?
+