aboutsummaryrefslogtreecommitdiffstats
path: root/package/sysklogd/S25syslog
blob: 793ac61298c63e45a8ef4c61f4f0be4c67c9baa4 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
#
# Starts syslog.
#



umask 077

start() {
 	echo -n "Starting syslogd: "
	start-stop-daemon -S -q -p /var/run/syslog.pid -x /sbin/syslogd -- -m 0
	echo "OK"

	echo -n "Starting klogd: "
	start-stop-daemon -S -q -p /var/run/klogd.pid -x /sbin/klogd
	echo "OK"
}
stop() {
	echo -n "Stopping klogd: "
	start-stop-daemon -K -n klogd
	echo "OK"

	echo -n "Stopping syslogd: "
	start-stop-daemon -K -n syslogd
	echo "OK"
}
restart() {
	stop
	start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart|reload)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?