updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / elog / elogd
blobdd75d78731a82c58fe66b252277d3300401db6e7
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/sbin/elogd`
7 case "$1" in
8 start)
9 stat_busy "Starting elogd"
10 [ -z "$PID" ] && /usr/sbin/elogd -D -c /etc/elog/elogd.cfg \
11 > /dev/null 2>&1
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon elogd
16 stat_done
19 stop)
20 stat_busy "Stopping elogd"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon elogd
26 stat_done
29 restart)
30 $0 stop
31 sleep 1
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
37 exit 0