A new user interface for you! Read more...

File cherokee.fedora.init of Package Cherokee

#!/bin/bash
#
# Contrib to RedHat Fedora Based Systems by: Manuel Arostegui Ramirez <manuel@todo-linux.com>
# description: Starts and stops the Cherokee ligth Web Server system
#

# Source function library
. /etc/rc.d/init.d/functions

NAME=cherokee
BASE=/usr/local/sbin/$NAME
DAEMON="-b"
CONF="/etc/cherokee/cherokee.conf"
PIDFILE="/var/run/$NAME.pid"

# Check that $BASE exists.
[ -f $BASE ] || exit 0

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

RETVAL=0
# See how we were called.
case "$1" in
  start)
        if [ -n "`/sbin/pidof $NAME`" ]; then
                echo -n $"$NAME: already running"
                echo ""
                exit $RETVAL
        fi
        echo -n "Starting Cherokee service: "
        $BASE -C $CONF $DAEMON pidfile $PIDFILE
        sleep 1
        action "" /sbin/pidof $NAME
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cherokee
        ;;
  stop)
        echo -n "Shutting down Cherokee service: "
        killproc $BASE
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/cherokee
        ;;
  restart|reload)
        $0 stop
        $0 start
        RETVAL=$?
        ;;
  status)
        status $BASE
        RETVAL=$?
        ;;
  *)
        echo "Usage: $NAME {start|stop|restart|reload|status}"
        exit 1
esac

exit $RETVAL