3 # collectd collectd (collectd daemon)
7 # description: utility that colect various system information into rrd files
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 [ -f /etc/sysconfig/collectd ] && . /etc/sysconfig/collectd
18 . /etc/sysconfig/network
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down collectd
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/collectd ]; then
34 daemon /usr/sbin/collectd
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/collectd
38 msg_already_running collectd
43 if [ -f /var/lock/subsys/collectd ]; then
46 rm -f /var/lock/subsys/collectd >/dev/null 2>&1
48 msg_not_running collectd
53 if [ -f /var/lock/subsys/collectd ]; then
57 msg_not_running collectd
85 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"