kumquat-buildroot/package/busybox/S01logging
Richard Genoud 034520c2c1 busybox: S01logging: implement restart
restart wasn't doing anything, and the expected behaviour is stop/start.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-01 23:19:07 +01:00

37 lines
546 B
Bash

#!/bin/sh
#
# Start logging
#
start() {
echo -n "Starting logging: "
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
echo "OK"
}
stop() {
echo -n "Stopping logging: "
start-stop-daemon -K -q -p /var/run/syslogd.pid
start-stop-daemon -K -q -p /var/run/klogd.pid
echo "OK"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?