[package] add syslog-ng3 (#5205)
[openwrt/svn-archive/archive.git] / admin / syslog-ng3 / files / syslog-ng.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3 START=50
4
5 start() {
6 [ -f /etc/syslog-ng/syslog-ng.conf ] || {
7 echo "/etc/syslog-ng/syslog-ng.conf does not exist !";
8 exit 0;
9 };
10 [ -d /var/run ] || mkdir -p /var/run
11 [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng
12 }
13
14 stop() {
15 killall syslog-ng
16 }
17
18 restart() {
19 stop
20 sleep 1
21 start
22 }
23
24 reload() {
25 kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
26 }
27