wok view tinyproxy/stuff/tinyproxy @ rev 25358

updated tinyproxy (1.10.0 -> 1.11.1)
author Hans-G?nter Theisgen
date Wed Jul 27 07:50:39 2022 +0100 (22 months ago)
parents ff5fd8788cd9
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/bin/tinyproxy
9 OPTION="-c"
10 PIDFILE=/var/run/tinyproxy.pid
12 case "$1" in
13 (start)
14 if active_pidfile $PIDFILE tinyproxy
15 then
16 _ '%s is already running.' $NAME
17 exit 1
18 fi
19 action 'Starting %s: %s...' "$DESC" $NAME
20 $DAEMON $OPTION /etc/tinyproxy/tinyproxy.conf
21 status
22 ;;
23 (stop)
24 if ! active_pidfile $PIDFILE tinyproxy
25 then
26 _ '%s is not running.' $NAME
27 exit 1
28 fi
29 action 'Stopping %s: %s...' "$DESC" $NAME
30 killall tinyproxy
31 rm $PIDFILE
32 status
33 ;;
34 (restart)
35 if ! active_pidfile $PIDFILE tinyproxy
36 then
37 _ '%s is not running.' $NAME
38 exit 1
39 fi
40 action 'Restarting %s: %s...' "$DESC" $NAME
41 killall tinyproxy
42 rm $PIDFILE
43 sleep 2
44 $DAEMON $OPTION /etc/tinyproxy/tinyproxy.conf
45 status
46 ;;
47 (*)
48 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
49 newline
50 exit 1
51 ;;
52 esac
54 exit 0