1#!/bin/sh 2DAEMON=/usr/sbin/cherokee 3CONFIG=/etc/cherokee/cherokee.conf 4PIDFILE=/var/run/cherokee.pid 5NAME="cherokee" 6DESC="Cherokee http server" 7 8test -r /etc/default/cherokee && . /etc/default/cherokee 9test -x "$DAEMON" || exit 0 10test ! -r "$CONFIG" && exit 0 11 12case "$1" in 13 start) 14 echo "Starting $DESC: " 15 start-stop-daemon --oknodo -S -x $DAEMON -- -d -C $CONFIG 16 ;; 17 18 stop) 19 echo "Stopping $DESC:" 20 start-stop-daemon -K -p $PIDFILE 21 ;; 22 23 restart) 24 $0 stop >/dev/null 2>&1 25 $0 start 26 ;; 27 28 *) 29 echo "Usage: $0 {start|stop|restart}" 30 exit 0 31 ;; 32esac 33