mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
add miau from Benjamin Binier, updated to newest upstream, thx. add syslog-ng from Sebastien Bourgasser, pending missing libol package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3378 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
34
openwrt/package/syslog-ng/files/syslog-ng.init
Executable file
34
openwrt/package/syslog-ng/files/syslog-ng.init
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user