wok-next view tinyproxy/stuff/tinyproxy @ rev 19647
Forgotten changes: libdrm-*, dbus, fontconfig, harfbuzz, libdrm, pixman, xorg-glproto.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Feb 23 00:58:26 2017 +0200 (2017-02-23) |
parents | 7f188676b59c |
children |
line source
1 #!/bin/sh
2 # /etc/init.d/tinyproxy: Start, stop and restart tinyproxy daemon on SliTaz
4 . /etc/init.d/rc.functions
6 NAME=Tinyproxy
7 DESC="$(_ 'Tiny Proxy')"
8 DAEMON=/usr/sbin/tinyproxy
9 OPTION="-c"
10 PIDFILE=/var/run/tinyproxy.pid
12 case "$1" in
13 start)
14 if active_pidfile $PIDFILE tinyproxy ; then
15 _ '%s is already running.' $NAME
16 exit 1
17 fi
18 action 'Starting %s: %s...' "$DESC" $NAME
19 $DAEMON $OPTION /etc/tinyproxy/tinyproxy.conf
20 status
21 ;;
22 stop)
23 if ! active_pidfile $PIDFILE tinyproxy ; then
24 _ '%s is not running.' $NAME
25 exit 1
26 fi
27 action 'Stopping %s: %s...' "$DESC" $NAME
28 killall tinyproxy
29 rm $PIDFILE
30 status
31 ;;
32 restart)
33 if ! active_pidfile $PIDFILE tinyproxy ; then
34 _ '%s is not running.' $NAME
35 exit 1
36 fi
37 action 'Restarting %s: %s...' "$DESC" $NAME
38 killall tinyproxy
39 rm $PIDFILE
40 sleep 2
41 $DAEMON $OPTION /etc/tinyproxy/tinyproxy.conf
42 status
43 ;;
44 *)
45 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
46 newline
47 exit 1
48 ;;
49 esac
51 exit 0