summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/init.d/syslog30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/etc/init.d/syslog b/src/etc/init.d/syslog
new file mode 100644
index 0000000..4979ce6
--- /dev/null
+++ b/src/etc/init.d/syslog
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+SYSLOG_ROTATE_SIZE=65536
+
+case "${1}" in
+ start)
+ printf 'Starting syslog... '
+ start-stop-daemon -S syslogd -m 0 -s "${SYSLOG_ROTATE_SIZE}" -L
+ printf 'done.'
+ printf 'Starting klogd... '
+ start-stop-daemon -S klogd
+ printf 'done.'
+ ;;
+ stop)
+ printf 'Stopping klogd... '
+ start-stop-daemon -K klogd
+ printf 'done.'
+ printf 'Stopping syslog... '
+ start-stop-daemon -K syslogd
+ printf 'done.'
+ ;;
+ restart)
+ "${0}" stop
+ "${0}" start
+ ;;
+ *)
+ printf 'Usage: %s {start|stop|restart}\n' "${0}"
+ exit 1
+ ;;
+esac