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