wok diff cherokee/stuff/cherokee @ rev 12715

cross-arm-binutils: improve package (use symlinks for gcc lib/include path)
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 05 04:00:34 2012 +0200 (2012-05-05)
parents
children e8c594a6b672
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cherokee/stuff/cherokee	Sat May 05 04:00:34 2012 +0200
     1.3 @@ -0,0 +1,61 @@
     1.4 +#!/bin/sh
     1.5 +# /etc/init.d/cherokee: Start, stop and restart Cherokee web server on SliTaz, 
     1.6 +# at boot time or with the command line. Daemons options are configured
     1.7 +# with /etc/daemons.conf
     1.8 +#
     1.9 +. /etc/init.d/rc.functions
    1.10 +. /etc/daemons.conf
    1.11 +
    1.12 +NAME=Cherokee
    1.13 +DESC="Cherokee Web Server"
    1.14 +DAEMON=/usr/sbin/cherokee
    1.15 +OPTIONS=
    1.16 +PIDFILE=/var/run/cherokee.pid
    1.17 +
    1.18 +case "$1" in
    1.19 +  start)
    1.20 +    if active_pidfile $PIDFILE cherokee ; then
    1.21 +      echo "$NAME already running."
    1.22 +      exit 1
    1.23 +    fi
    1.24 +    echo -n "Starting $DESC: $NAME... "
    1.25 +    $DAEMON $OPTIONS -k start 
    1.26 +    status
    1.27 +    ;;
    1.28 +  stop)
    1.29 +    if ! active_pidfile $PIDFILE cherokee ; then
    1.30 +      echo "$NAME is not running."
    1.31 +      exit 1
    1.32 +    fi
    1.33 +    echo -n "Stopping $DESC: $NAME... "
    1.34 +    $DAEMON $OPTION -k stop
    1.35 +    rm $PIDFILE
    1.36 +    status
    1.37 +    ;;
    1.38 +  reload)
    1.39 +    if ! active_pidfile $PIDFILE cherokee ; then
    1.40 +      echo "$NAME is not running."
    1.41 +      exit 1
    1.42 +    fi
    1.43 +    echo -n "Stopping $DESC: $NAME... "
    1.44 +    $DAEMON $OPTION -k graceful
    1.45 +    status
    1.46 +    ;;
    1.47 +  restart)
    1.48 +    if ! active_pidfile $PIDFILE cherokee ; then
    1.49 +      echo "$NAME is not running."
    1.50 +      exit 1
    1.51 +    fi
    1.52 +    echo -n "Restarting $DESC: $NAME... "
    1.53 +    $DAEMON $OPTIONS -k restart
    1.54 +    status
    1.55 +    ;;
    1.56 +  *)
    1.57 +    echo ""
    1.58 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|reload|restart]"
    1.59 +    echo ""
    1.60 +    exit 1
    1.61 +    ;;
    1.62 +esac
    1.63 +
    1.64 +exit 0