wok diff tinyproxy/stuff/tinyproxy @ rev 8042

Fix: xfce4-settings needs exo to compile
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Jan 20 16:46:44 2011 +0100 (2011-01-20)
parents
children 7f188676b59c
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tinyproxy/stuff/tinyproxy	Thu Jan 20 16:46:44 2011 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +#!/bin/sh
     1.5 +# /etc/init.d/tinyproxy: Start, stop and restart tinyproxy deamon on SliTaz
     1.6 +
     1.7 +. /etc/init.d/rc.functions
     1.8 +
     1.9 +NAME=Tinyproxy
    1.10 +DESC="Tiny Proxy"
    1.11 +DAEMON=/usr/sbin/tinyproxy
    1.12 +OPTION="-c"
    1.13 +PIDFILE=/var/run/tinyproxy.pid
    1.14 +
    1.15 +case "$1" in
    1.16 +  start)
    1.17 +    if active_pidfile $PIDFILE tinyproxy ; then
    1.18 +      echo "$NAME already running."
    1.19 +      exit 1
    1.20 +    fi
    1.21 +    echo -n "Starting $DESC: $NAME... "
    1.22 +    $DAEMON $OPTION /etc/tinyproxy/tinyproxy.conf
    1.23 +    status
    1.24 +    ;;
    1.25 +  stop)
    1.26 +    if ! active_pidfile $PIDFILE tinyproxy ; then
    1.27 +      echo "$NAME is not running."
    1.28 +      exit 1
    1.29 +    fi
    1.30 +    echo -n "Stopping $DESC: $NAME... "
    1.31 +    killall tinyproxy
    1.32 +    rm $PIDFILE
    1.33 +    status
    1.34 +    ;;
    1.35 +  restart)
    1.36 +    if ! active_pidfile $PIDFILE tinyproxy ; then
    1.37 +      echo "$NAME is not running."
    1.38 +      exit 1
    1.39 +    fi
    1.40 +    echo -n "Restarting $DESC: $NAME... "
    1.41 +    killall tinyproxy
    1.42 +    rm $PIDFILE
    1.43 +    sleep 2
    1.44 +    $DAEMON $OPTION /etc/tinyproxy/tinyproxy.conf
    1.45 +    status
    1.46 +    ;;
    1.47 +  *)
    1.48 +    echo ""
    1.49 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.50 +    echo ""
    1.51 +    exit 1
    1.52 +    ;;
    1.53 +esac
    1.54 +
    1.55 +exit 0
    1.56 \ No newline at end of file