updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / rsyslog-zmq / rsyslog
blobee0145418e1f128b2ac8e087b527a3b5d8a50321
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
5 . /etc/conf.d/rsyslog
7 PID=`pidof -o %PPID /usr/sbin/rsyslogd`
8 case "$1" in
9 start)
10 stat_busy "Starting RSyslogd"
11 [ -z "$PID" ] && /usr/sbin/rsyslogd $RSYSLOGD_ARGS
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon rsyslogd
16 stat_done
19 stop)
20 stat_busy "Stopping RSyslogd"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm -f /var/run/rsyslogd.pid
26 rm -f /var/rsyslogd.persist
27 rm_daemon rsyslogd
28 stat_done
31 restart)
32 $0 stop
33 sleep 1
34 $0 start
37 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0