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

updated ttf-open-dyslexic (20121111 -> 20160623)
author Hans-G?nter Theisgen
date Wed Oct 23 15:39:03 2019 +0100 (2019-10-23)
parents 0d8a1a3edc72
children
rev   line source
erjo@11941 1 #!/bin/sh
al@19159 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
al@19159 12 DESC="$(_ '%s server' ICAP)"
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
pascal@16681 17 [ -d /var/run/c-icap ] || mkdir -p /var/run/c-icap
erjo@11941 18 case "$1" in
erjo@11941 19 start)
erjo@11941 20 if active_pidfile $PIDFILE $NAME ; then
al@19159 21 _ '%s is already running.' $NAME
erjo@11941 22 exit 1
erjo@11941 23 fi
al@19159 24 action 'Starting %s: %s...' "$DESC" $NAME
al@19159 25 $DAEMON $OPTIONS
erjo@11941 26 status
erjo@11941 27 ;;
erjo@11941 28 stop)
erjo@11941 29 if ! active_pidfile $PIDFILE $NAME ; then
al@19159 30 _ '%s is not running.' $NAME
erjo@11941 31 exit 1
erjo@11941 32 fi
al@19159 33 action 'Stopping %s: %s...' "$DESC" $NAME
al@19159 34 kill $(cat $PIDFILE)
erjo@11941 35 status
erjo@11941 36 ;;
erjo@11941 37 restart|reload)
erjo@11941 38 if ! active_pidfile $PIDFILE $NAME ; then
al@19159 39 _ '%s is not running.' $NAME
erjo@11941 40 exit 1
erjo@11941 41 fi
al@19159 42 action 'Restarting %s: %s...' "$DESC" $NAME
al@19159 43 kill $(cat $PIDFILE)
erjo@11941 44 sleep 2
erjo@11941 45 $DAEMON $OPTIONS
erjo@11941 46 status
erjo@11941 47 ;;
erjo@11941 48 test)
al@19159 49 configtest ;;
erjo@11941 50 *)
al@19159 51 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart|reload|test]"
al@19159 52 newline
erjo@11941 53 exit 1
erjo@11941 54 ;;
erjo@11941 55 esac
erjo@11941 56
erjo@11941 57 exit 0