3 # carbon-cache init file for starting up the carbon-cache daemon
5 # chkconfig: 2345 20 80
6 # description: Starts and stops the carbon-cache daemon.
8 # Source function library.
9 . /etc/rc.d/init.d/functions
11 exec="/usr/bin/carbon-cache"
12 pidfile="/var/run/carbon-cache.pid"
14 CONFIG="/etc/carbon/carbon.conf"
15 LOG_DIR="/var/log/carbon"
17 [ -e /etc/sysconfig/carbon ] && . /etc/sysconfig/carbon
19 lockfile=/var/lock/subsys/carbon-cache
22 [ -f $CONFIG ] || exit 6
23 [ -x $exec ] || exit 5
24 echo -n $"Starting `basename $exec`: "
25 daemon "$exec --config=$CONFIG --pidfile=$pidfile --logdir=$LOG_DIR start"
28 [ $retval -eq 0 ] && touch $lockfile
33 echo -n $"Stopping `basename $exec`: "
34 killproc -p $pidfile `basename $exec`
37 [ $retval -eq 0 ] && rm -f $lockfile
52 status -p $pidfile `basename $exec`
56 rh_status >/dev/null 2>&1
77 condrestart|try-restart)
82 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"