3 # chkconfig: 2345 19 81
4 # description: rrdcached startup script
7 RRDCACHED=/usr/bin/rrdcached
9 . /etc/rc.d/init.d/functions
11 . /etc/default/rrdcached
17 if [ ${RUN_RRDCACHED} -eq 0 ];
19 echo "Please enable rrdcached in /etc/default/rrdcached"
23 echo -n "Starting rrdcached: "
24 [ -f $RRDCACHED ] || exit 1
26 daemon --user=$RRDCACHED_USER \
27 $RRDCACHED $OPTS -p $PIDFILE -l $SOCKFILE
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rrdcached
31 [ $RETVAL -eq 0 ] && chmod $SOCKPERMS "${SOCKFILE}"
35 echo -n "Shutting down rrdcached: "
39 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rrdcached && rm -rf $PIDFILE
52 echo "Usage: $0 {start|stop|restart|status}"