wok annotate cherokee/stuff/cherokee @ rev 20534

Add util-linux-losetup
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 26 09:46:23 2018 +0100 (2018-11-26)
parents 60564f86c380
children
rev   line source
slaxemulator@7226 1 #!/bin/sh
al@19159 2 # /etc/init.d/cherokee: Start, stop and restart Cherokee web server on SliTaz,
slaxemulator@7226 3 # at boot time or with the command line. Daemons options are configured
slaxemulator@7226 4 # with /etc/daemons.conf
slaxemulator@7226 5 #
slaxemulator@7226 6 . /etc/init.d/rc.functions
slaxemulator@7226 7 . /etc/daemons.conf
slaxemulator@7226 8
slaxemulator@7226 9 NAME=Cherokee
al@19159 10 DESC="$(_ 'Cherokee Web Server')"
slaxemulator@7226 11 DAEMON=/usr/sbin/cherokee
slaxemulator@7226 12 OPTIONS=
slaxemulator@7226 13 PIDFILE=/var/run/cherokee.pid
slaxemulator@7226 14
slaxemulator@7226 15 case "$1" in
slaxemulator@7226 16 start)
slaxemulator@7226 17 if active_pidfile $PIDFILE cherokee ; then
al@19159 18 _ '%s is already running.' $NAME
slaxemulator@7226 19 exit 1
slaxemulator@7226 20 fi
al@19159 21 action 'Starting %s: %s...' "$DESC" $NAME
al@19159 22 $DAEMON $OPTIONS -d &>/dev/null
slaxemulator@7226 23 status
slaxemulator@7226 24 ;;
slaxemulator@7226 25 stop)
slaxemulator@7226 26 if ! active_pidfile $PIDFILE cherokee ; then
al@19159 27 _ '%s is not running.' $NAME
slaxemulator@7226 28 exit 1
slaxemulator@7226 29 fi
al@19159 30 action 'Stopping %s: %s...' "$DESC" $NAME
mojo@15183 31 kill $(cat $PIDFILE)
slaxemulator@7226 32 status
slaxemulator@7226 33 ;;
slaxemulator@7226 34 restart)
slaxemulator@7226 35 if ! active_pidfile $PIDFILE cherokee ; then
al@19159 36 _ '%s is not running.' $NAME
slaxemulator@7226 37 exit 1
slaxemulator@7226 38 fi
al@19159 39 action 'Restarting %s: %s...' "$DESC" $NAME
mojo@15183 40 kill $(cat $PIDFILE)
mojo@15183 41 rm $PIDFILE
mojo@15183 42 sleep 2
mojo@15183 43 $DAEMON $OPTIONS -d &>/dev/null
slaxemulator@7226 44 status
slaxemulator@7226 45 ;;
slaxemulator@7226 46 *)
al@19159 47 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
al@19159 48 newline
slaxemulator@7226 49 exit 1
slaxemulator@7226 50 ;;
slaxemulator@7226 51 esac
slaxemulator@7226 52
slaxemulator@7226 53 exit 0