#!/bin/sh # # cherokee Start the cherokee HTTP server. # hack to run with busybox e.g. --oknodo not supported # shell sh not bash no local directory # NAME=cherokee PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib/cherokee DAEMON=/usr/sbin/cherokee PIDFILE=/var/run/$NAME.pid CONF=/etc/cherokee/cherokee.conf trap "" 1 export LANG=C export PATH test -f $DAEMON || exit 0 case "$1" in start) echo "Starting cherokee web server: $NAME" start-stop-daemon --start --pidfile $PIDFILE -b --exec $DAEMON ;; stop) echo "Stopping cherokee web server: $NAME" start-stop-daemon --stop --pidfile $PIDFILE --exec $DAEMON ;; reload) echo "Reloading $NAME configuration" start-stop-daemon --stop --pidfile $PIDFILE --signal 1 --exec $DAEMON ;; reload-modules) echo "Reloading $NAME modules" start-stop-daemon --stop --pidfile $PIDFILE sleep 1 start-stop-daemon --start --pidfile $PIDFILE -b --exec $DAEMON ;; restart) $0 reload-modules exit $? ;; force-reload) $0 reload-modules exit $? ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|reload-modules|force-reload|restart}" exit 1 ;; esac echo