2011-06-29 15:46:20 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Start logging
|
|
|
|
#
|
|
|
|
|
2016-03-07 10:48:17 +01:00
|
|
|
SYSLOGD_ARGS=-n
|
|
|
|
KLOGD_ARGS=-n
|
|
|
|
[ -r /etc/default/logging ] && . /etc/default/logging
|
|
|
|
|
2015-01-20 12:38:35 +01:00
|
|
|
start() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting logging: "
|
2016-03-07 10:48:17 +01:00
|
|
|
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- $SYSLOGD_ARGS
|
|
|
|
start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- $KLOGD_ARGS
|
2011-06-29 15:46:20 +02:00
|
|
|
echo "OK"
|
2015-01-20 12:38:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "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 $?
|