wok annotate c_icap/stuff/c-icapd @ rev 14314

Add: terminology (0.3.0)
author Dominique Corbex <domcox@slitaz.org>
date Sun Apr 07 10:28:42 2013 +0200 (2013-04-07)
parents
children 0d8a1a3edc72
rev   line source
erjo@11941 1 #!/bin/sh
erjo@11941 2 # /etc/init.d/nagios : Start, stop and restart ICAP server on SliTaz, at
erjo@11941 3 # boot time or with the command line.
erjo@11941 4 #
erjo@11941 5 # To start ICAP server at boot time, just put c-icapd in the $RUN_DAEMONS
erjo@11941 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf
erjo@11941 7 #
erjo@11941 8 . /etc/init.d/rc.functions
erjo@11941 9 . /etc/daemons.conf
erjo@11941 10
erjo@11941 11 NAME=c-icap
erjo@11941 12 DESC="ICAP Server"
erjo@11941 13 DAEMON=/usr/bin/c-icap
erjo@11941 14 OPTIONS=""
erjo@11941 15 PIDFILE=/var/run/c-icap/c-icap.pid
erjo@11941 16
erjo@11941 17 case "$1" in
erjo@11941 18 start)
erjo@11941 19 if active_pidfile $PIDFILE $NAME ; then
erjo@11941 20 echo "$NAME already running."
erjo@11941 21 exit 1
erjo@11941 22 fi
erjo@11941 23 echo -n "Starting $DESC: $NAME... "
erjo@11941 24 $DAEMON $OPTIONS
erjo@11941 25 status
erjo@11941 26 ;;
erjo@11941 27 stop)
erjo@11941 28 if ! active_pidfile $PIDFILE $NAME ; then
erjo@11941 29 echo "$NAME is not running."
erjo@11941 30 exit 1
erjo@11941 31 fi
erjo@11941 32 echo -n "Stopping $DESC: $NAME... "
erjo@11941 33 kill `cat $PIDFILE`
erjo@11941 34 status
erjo@11941 35 ;;
erjo@11941 36 restart|reload)
erjo@11941 37 if ! active_pidfile $PIDFILE $NAME ; then
erjo@11941 38 echo "$NAME is not running."
erjo@11941 39 exit 1
erjo@11941 40 fi
erjo@11941 41 echo -n "Restarting $DESC: $NAME... "
erjo@11941 42 kill `cat $PIDFILE`
erjo@11941 43 sleep 2
erjo@11941 44 $DAEMON $OPTIONS
erjo@11941 45 status
erjo@11941 46 ;;
erjo@11941 47 test)
erjo@11941 48 configtest ;;
erjo@11941 49 *)
erjo@11941 50 echo ""
erjo@11941 51 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart|reload]"
erjo@11941 52 echo ""
erjo@11941 53 exit 1
erjo@11941 54 ;;
erjo@11941 55 esac
erjo@11941 56
erjo@11941 57 exit 0