summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-04-26 20:53:22 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-04-26 20:53:22 (EDT)
commitc0807375ff3dd6242d9981e8add2d941bf52d379 (patch)
treeeadc5bfc487cd70466cdfbefc1f99ecd2e9b09c2 /src
parente4199494aeda5760d823e2e73ae7f6527b902096 (diff)
Add "syslog" service.
Diffstat (limited to 'src')
-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