3 # rrdcached This shell script takes care of starting and stopping
6 # chkconfig: 2345 19 81
7 # description: It comes by night and sucks the vital essence from your computers.
10 # Source function library
11 . /etc/rc.d/init.d/functions
13 [ -f /etc/sysconfig/rrdcached ] && . /etc/sysconfig/rrdcached
15 # Set defaults if not defined in service config file
16 RRDCACHED_WRITE_TIMEOUT=${RRDCACHED_WRITE_TIMEOUT:-300}
17 RRDCACHED_WRITE_DELAY=${RRDCACHED_WRITE_DELAY:-180}
18 RRDCACHED_WRITE_THREADS=${RRDCACHED_WRITE_THREADS:-4}
19 RRDCACHED_PID_FILE="/var/run/rrdcached.pid"
20 RRDCACHED_SOCKET="/var/run/rrdcached.sock"
23 # Check if the service is already running?
24 if [ -f /var/lock/subsys/rrdcached ]; then
25 msg_already_running "rrdcached"
29 msg_starting "rrdcached"
30 daemon /usr/bin/rrdcached -m 0660 -w ${RRDCACHED_WRITE_TIMEOUT} -z ${RRDCACHED_WRITE_DELAY} -t ${RRDCACHED_WRITE_THREADS} -p ${RRDCACHED_PID_FILE} -l ${RRDCACHED_SOCKET}
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rrdcached
36 if [ ! -f /var/lock/subsys/rrdcached ]; then
37 msg_not_running "rrdcached"
42 msg_stopping "rrdcached"
43 killproc /usr/sbin/rrdcached
44 rm -f /var/lock/subsys/rrdcached
48 if [ ! -f /var/lock/subsys/rrdcached ]; then
49 msg_not_running "rrdcached"
74 msg_usage "$0 {start|stop|restart|status}"