updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / agnclient / agnLogd
blob3462548ef3b70c67029af2488a9b04fb68929e0f
1 #!/bin/bash
3 # agnLogd: Starts the AGNS Log Daemon
6 . /etc/rc.conf
7 . /etc/rc.d/functions
9 PID="$(cat /var/run/agnLogd.pid 2>/dev/null)"
11 case "$1" in
12 start)
13 stat_busy "Starting AGNS Log Daemon"
14 /opt/agns/bin/agnLogd &> /dev/null
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon agnLogd
19 stat_done
22 stop)
23 stat_busy "Stopping AGNS Log Daemon"
24 [ ! -z "$PID" ] && kill $PID &> /dev/null
25 if [ $? -gt 0 ]; then
26 stat_fail
27 else
28 rm_daemon agnLogd
29 stat_done
32 restart)
33 $0 stop
34 sleep 1
35 $0 start
38 echo "usage: $0 {start|stop|restart}"
39 esac
40 exit 0
43 # See how we were called.
44 case "$1" in
45 start)
46 start
48 stop)
49 stop
51 status)
52 status agnLogd
53 RETVAL=$?
55 restart)
56 stop
57 start
59 condrestart)
60 if [ -f /var/lock/subsys/agnLogd ]; then
61 stop
62 start
65 reload)
66 killproc agnLogd -HUP
67 RETVAL=$?
70 echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
72 esac
73 exit $RETVAL