Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 811888ca9d152904122984edf695fb81 > files > 6

c-icap-060708-2mdv2009.0.src.rpm

#!/bin/sh
#
# Startup script for the c_icap daemon
#
# chkconfig: 345 56 44
# description: An ICAP server coded in C
# processname: icapd
# pidfile: /var/run/icapd/icap.pid
# config: /etc/sysconfig/icapd

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check for and source configuration file otherwise set defaults
[ -f /etc/sysconfig/icapd ] && . /etc/sysconfig/icapd

[ -x /usr/sbin/icapd ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting icapd: "
	daemon icapd ${ICAPD_OPTIONS}
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/icapd
	;;
  stop)
	echo -n "Stopping icapd: "
	killproc icapd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/icapd
	;;
  status)
	status icapd
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: icapd {start|stop|status|restart|reload}"
	exit 1
esac

exit $RETVAL