mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-14 14:01:53 +02:00
35 lines
524 B
Plaintext
35 lines
524 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
syslog_start() {
|
||
|
[ -f /etc/syslog-ng/syslog-ng.conf ] || {
|
||
|
echo "/etc/syslog-ng/syslog-ng.conf does not exist !";
|
||
|
exit 0;
|
||
|
};
|
||
|
[ -d /var/run ] || mkdir -p /var/run
|
||
|
[ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng
|
||
|
}
|
||
|
|
||
|
syslog_stop() {
|
||
|
killall syslog-ng
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
syslog_start
|
||
|
;;
|
||
|
stop)
|
||
|
syslog_stop
|
||
|
;;
|
||
|
restart)
|
||
|
syslog_stop
|
||
|
sleep 1s
|
||
|
syslog_start
|
||
|
;;
|
||
|
reload)
|
||
|
kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 <start|stop|restart|reload>"
|
||
|
;;
|
||
|
esac
|