summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/syslog
blob: 3a3e980a35be86ec0ad65c4e82455f4aeaba1cf8 (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
31
32
33
34
35
#!/bin/sh

SYSLOG_ROTATE_SIZE=65536

start()
{
	printf 'Starting syslog... '
	start-stop-daemon -S -q -n syslogd -x syslogd -- \
		-s "${SYSLOG_ROTATE_SIZE}"
	printf 'done.\n'
}

stop()
{
	printf 'Stopping syslog... '
	start-stop-daemon -K -q -n syslogd
	printf 'done.\n'
}

case "${1}" in
	start)
		start
		;;
	stop)
		stop
		;;
	restart)
		stop
		start
		;;
	*)
		printf 'Usage: %s {start|stop|restart}\n' "${0}"
		exit 1
		;;
esac