summaryrefslogtreecommitdiffstats
path: root/src/etc/init.d/syslog
blob: 77e56d078b12ef2ca5657e064cd86142c264968c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

SYSLOG_ROTATE_SIZE=65536

case "${1}" in
	start)
		printf 'Starting syslog... '
		start-stop-daemon -S -n syslogd -- syslogd -m 0 -s "${SYSLOG_ROTATE_SIZE}" -L
		printf 'done.'
		printf 'Starting klogd... '
		start-stop-daemon -S -n klogd -- klogd
		printf 'done.'
		;;
	stop)
		printf 'Stopping klogd... '
		start-stop-daemon -K -n klogd
		printf 'done.'
		printf 'Stopping syslog... '
		start-stop-daemon -K -n syslogd
		printf 'done.'
		;;
	restart)
		"${0}" stop
		"${0}" start
		;;
	*)
		printf 'Usage: %s {start|stop|restart}\n' "${0}"
		exit 1
		;;
esac