banana-pro: bring it in shape
[openadk.git] / package / rsyslog / files / rsyslog.init
blob78b9831c0c7fcb724d9d10a903e57705b9fae4d0
1 #!/bin/sh
2 #PKG rsyslog
3 #INIT 05
4 . /etc/rc.conf
6 case $1 in
7 autostop) ;;
8 autostart)
9 test x"${rsyslog:-NO}" = x"NO" && exit 0
10 test x"$rsyslog" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
11 exec sh $0 start
13 start)
14 [ -d /var/spool/rsyslog ] || mkdir -p /var/spool/rsyslog
15 /usr/sbin/rsyslogd
17 stop)
18 kill $(pgrep -f /usr/sbin/rsyslogd)
20 restart)
21 sh $0 stop
22 sh $0 start
25 echo "usage: $0 {start | stop | restart}"
27 esac
28 exit $?