3 # Source function library.
4 . /etc/init.d/functions
10 if [ -r /etc/default/$prog ]; then
14 if [ -n "$DATA_DIR" ]; then
18 if [ -n "$PING_HOST" ]; then
19 for HOST in $PING_HOST
26 if [ "x$START_SERVER" = "xyes" ]
28 echo -n $"Starting $prog (server): "
29 daemon /usr/sbin/collectd -s $ARGS
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
34 if [ "x$START_CLIENT" = "xyes" ]
36 echo -n $"Starting $prog (client): "
37 daemon /usr/sbin/collectd -c $ARGS
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
42 if [ "x$START_SERVER" != "xyes" -a "x$START_CLIENT" != "xyes" ]
44 echo -n $"Starting $prog: "
45 daemon /usr/sbin/collectd -l $ARGS
48 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
52 echo -n $"Stopping $prog: "
56 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
58 # See how we were called.
74 [ -f /var/lock/subsys/$prog ] && restart || :
77 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"