wok-stable diff chillispot/stuff/chilli @ rev 6119

Add cd-discid (1.1) get CDDB discid information from a CD
author Dominique Corbex <domcox@slitaz.org>
date Sun Sep 05 11:46:52 2010 +0200 (2010-09-05)
parents
children 1b6281d68d9f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/chillispot/stuff/chilli	Sun Sep 05 11:46:52 2010 +0200
     1.3 @@ -0,0 +1,55 @@
     1.4 +#!/bin/sh
     1.5 +# /etc/init.d/chilli : Start, stop and restart ChilliSpot server on SliTaz, at 
     1.6 +# boot time or with the command line.
     1.7 +#
     1.8 +# To start ChilliSpot server at boot time, just put chilli in the $RUN_DAEMONS
     1.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    1.10 +#
    1.11 +. /etc/init.d/rc.functions
    1.12 +. /etc/daemons.conf
    1.13 +
    1.14 +NAME=ChilliSpot
    1.15 +DESC="ChilliSpot server"
    1.16 +DAEMON=/usr/sbin/chilli
    1.17 +OPTIONS=$CHILLI_OPTIONS
    1.18 +PIDFILE=/var/run/chilli.pid
    1.19 +[ -n "$OPTIONS" ] || OPTIONS="--pidfile $PIDFILE --statedir /var/lib/chilli/"
    1.20 +
    1.21 +case "$1" in
    1.22 +  start)
    1.23 +    if [ -f $PIDFILE ] ; then
    1.24 +      echo "$NAME already running."
    1.25 +      exit 1
    1.26 +    fi
    1.27 +    $DAEMON $OPTIONS
    1.28 +    status
    1.29 +    ;;
    1.30 +  stop)
    1.31 +    if [ ! -f $PIDFILE ] ; then
    1.32 +      echo "$NAME is not running."
    1.33 +      exit 1
    1.34 +    fi
    1.35 +    echo -n "Stopping $DESC: $NAME... "
    1.36 +    kill `cat $PIDFILE`
    1.37 +    status
    1.38 +    ;;
    1.39 +  restart)
    1.40 +    if [ ! -f $PIDFILE ] ; then
    1.41 +      echo "$NAME is not running."
    1.42 +      exit 1
    1.43 +    fi
    1.44 +    echo -n "Restarting $DESC: $NAME... "
    1.45 +    kill `cat $PIDFILE`
    1.46 +    sleep 2
    1.47 +    $DAEMON $OPTIONS
    1.48 +    status
    1.49 +    ;;
    1.50 +  *)
    1.51 +    echo ""
    1.52 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.53 +    echo ""
    1.54 +    exit 1
    1.55 +    ;;
    1.56 +esac
    1.57 +
    1.58 +exit 0