mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
dcf31c6a1e
--------- Co-authored-by: tiopex <tiopxyz@gmail.com> Co-authored-by: tiopex <67048640+tiopex@users.noreply.github.com>
39 lines
573 B
Bash
39 lines
573 B
Bash
#!/bin/sh
|
|
|
|
start() {
|
|
printf "Starting syslog-ng daemon: "
|
|
start-stop-daemon -S -q -p /var/run/syslog-ng.pid \
|
|
-x /usr/sbin/syslog-ng -- --pidfile /var/run/syslog-ng.pid
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
}
|
|
|
|
stop() {
|
|
printf "Stopping syslog-ng daemon: "
|
|
start-stop-daemon -K -q -p /var/run/syslog-ng.pid \
|
|
-x /usr/sbin/syslog-ng
|
|
[ $? = 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 $?
|