aboutsummaryrefslogtreecommitdiff
path: root/package/sysklogd/init-syslog
blob: 07683ed2f0f39cd8bd0bd386eb1955000ce50a80 (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 --start --quiet --pidfile /var/run/syslog.pid --exec /sbin/syslogd -- -m 0
	echo "OK"

	echo -n "Starting klogd: "
	start-stop-daemon --start --quiet --pidfile /var/run/klogd.pid --exec /sbin/klogd
	echo "OK"
}
stop() {
	echo -n "Stopping klogd: "
	start-stop-daemon --stop --name klogd
	echo "OK"

	echo -n "Stopping syslogd: "
	start-stop-daemon --stop --name 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 $?