2011-06-29 15:46:20 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Start logging
|
|
|
|
#
|
|
|
|
|
2015-01-20 12:38:35 +01:00
|
|
|
start() {
|
2011-07-13 02:45:22 +02:00
|
|
|
echo -n "Starting logging: "
|
2013-11-06 11:00:56 +01:00
|
|
|
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
|
|
|
|
start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n
|
2011-06-29 15:46:20 +02:00
|
|
|
echo "OK"
|
2015-01-20 12:38:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-07-13 02:45:22 +02:00
|
|
|
echo -n "Stopping logging: "
|
2013-03-25 05:48:12 +01:00
|
|
|
start-stop-daemon -K -q -p /var/run/syslogd.pid
|
2011-06-29 15:46:20 +02:00
|
|
|
start-stop-daemon -K -q -p /var/run/klogd.pid
|
|
|
|
echo "OK"
|
2015-01-20 12:38:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
2011-06-29 15:46:20 +02:00
|
|
|
;;
|
|
|
|
restart|reload)
|
2015-01-20 12:38:35 +01:00
|
|
|
stop
|
|
|
|
start
|
2011-06-29 15:46:20 +02:00
|
|
|
;;
|
|
|
|
*)
|
2012-03-15 22:08:09 +01:00
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
2011-06-29 15:46:20 +02:00
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|