3 # collectd Startup script for the Collectd statistics gathering daemon
5 # description: Collectd is a statistics gathering daemon used to collect \
6 # system information ie. cpu, memory, disk, network
7 # processname: collectd
8 # config: /etc/collectd.conf
9 # config: /etc/sysconfig/collectd
10 # pidfile: /var/run/collectd.pid
12 # Source function library.
13 . /etc/init.d/functions
19 CONFIG=/etc/collectd.conf
20 COLLECTD=/usr/sbin/collectd
21 COLLECTDMONPID=/var/run/collectdmon.pid
23 if [ -r /etc/sysconfig/$service ]; then
24 . /etc/sysconfig/$service
28 if test ! -r "$CONFIG"; then
31 if ! $COLLECTD -t -C "$CONFIG"; then
39 echo -n $"Starting collectd: "
42 if test "$rc" -ne 0; then
44 echo $"not starting due to configuration error"
45 failure $"not starting $service due to configuration error"
47 daemon $prog -P $COLLECTDMONPID -c $COLLECTD -- -C "$CONFIG" $ARGS
50 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$service
54 echo -n $"Stopping collectd: "
58 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$service
60 # See how we were called.
74 if test "$rc" -ne 0; then
76 echo $"not restarting due to configuration error"
77 failure $"not restarting $service due to configuration error"
84 [ -f /var/lock/subsys/$prog ] && restart || :
87 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"