kumquat-buildroot/package/rsyslog/S01logging

37 lines
532 B
Plaintext
Raw Normal View History

#!/bin/sh
start() {
printf "Starting rsyslog daemon: "
start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
printf "Stopping rsyslog daemon: "
start-stop-daemon -K -q -p /var/run/rsyslogd.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?