2006-10-04 21:04:48 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2006-08-08 14:56:43 +00:00
|
|
|
|
2006-10-04 21:04:48 +00:00
|
|
|
start() {
|
2006-08-08 14:56:43 +00:00
|
|
|
[ -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
|
|
|
|
}
|
|
|
|
|
2006-10-04 21:04:48 +00:00
|
|
|
stop() {
|
2006-08-08 14:56:43 +00:00
|
|
|
killall syslog-ng
|
|
|
|
}
|
|
|
|
|
2006-10-04 21:04:48 +00:00
|
|
|
restart() {
|
|
|
|
stop
|
|
|
|
sleep 1
|
|
|
|
start
|
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
2006-08-08 14:56:43 +00:00
|
|
|
kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
|
2006-10-04 21:04:48 +00:00
|
|
|
}
|
|
|
|
|