summaryrefslogtreecommitdiff
path: root/package/rsyslog/S01rsyslog
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2011-06-29 15:46:21 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-07-05 08:26:44 +0200
commit6e53e059c82ba0ac235a5ca732a40b8999a7e65e (patch)
tree54977c024cade26f97dea278effcede2048c74e4 /package/rsyslog/S01rsyslog
parent348e07c88d4c79e78b26dab3745f75da2c2d6b9a (diff)
package: add rsyslog
Rsyslog is a powerful and flexible syslog daemon. [Peter: whitespace, rename initscript, allow platform override of conf file] Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
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 $?
+