wok view tinyproxy/stuff/tinyproxy @ rev 22040

updated tokyocabinet and tokyocabinet-dev (1.4.32 -> 1.4.48)
author Hans-G?nter Theisgen
date Mon Oct 21 17:24:12 2019 +0100 (2019-10-21)
parents 7f188676b59c
children 4a5dc3aa2af9
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