packages/admin/syslog-ng3/files/syslog-ng.init
florian bfb9394040 [package] update syslog-ng3 to 3.0.4, remove some duplicate dependencies, fix init scripts (#5716)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@17298 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-08-18 14:49:11 +00:00

28 lines
407 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
start() {
[ -f /etc/syslog-ng.conf ] || {
echo "/etc/syslog-ng.conf does not exist !";
exit 0;
};
[ -d /var/run ] || mkdir -p /var/run
[ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng
}
stop() {
killall syslog-ng
}
restart() {
stop
sleep 1
start
}
reload() {
kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
}