Changes of Revision 5
[-] [+] | Changed | c-icap.spec |
[-] [+] | Added | c-icap.init.rh ^ |
@@ -0,0 +1,51 @@ +#!/bin/bash + +# c-icap: Start/Stop c-icap +# chkconfig: - 70 30 +# description: c-icap is an implementation of an ICAP server. +# processname: c-icap +# pidfile: /var/run/c-icap/c-icap.pid + +. /etc/rc.d/init.d/functions +. /etc/sysconfig/network + +CONFIG_FILE=/etc/c-icap.conf +PID_DIR=/var/run/c-icap + +RETVAL=0 +start() { + echo -n $"Starting c-icap: " + daemon /usr/sbin/c-icap + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/c-icap + return $RETVAL +} +stop() { + echo -n $"Stopping c-icap: " + killproc c-icap + rm -f /var/run/c-icap/c-icap.ctl + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f $PID_DIR/c-icap.pid /var/lock/subsys/c-icap + return $RETVAL +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status c-icap + ;; + restart) + stop + start + ;; + *) + echo $"Usage: $0 {start|stop|status|restart}" + exit 1 +esac +exit $? |