summaryrefslogtreecommitdiff
path: root/openwrt/package/tinyproxy/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2006-01-28 01:40:49 +0000
committerFlorian Fainelli <florian@openwrt.org>2006-01-28 01:40:49 +0000
commit0d506c99805aeb1c63ff6ff4a129073d2a342e27 (patch)
tree14c280f1ca3f6bd69db2d2ba7413627182f93abd /openwrt/package/tinyproxy/files
parent34a6cbba4684964e1fb0ba4c0df6a80335ba738a (diff)
downloadmtk-20170518-0d506c99805aeb1c63ff6ff4a129073d2a342e27.zip
mtk-20170518-0d506c99805aeb1c63ff6ff4a129073d2a342e27.tar.gz
mtk-20170518-0d506c99805aeb1c63ff6ff4a129073d2a342e27.tar.bz2
Addded tinyproxy : lightweight HTTP/HTTPS proxy with support for transparent proxying
SVN-Revision: 3059
Diffstat (limited to 'openwrt/package/tinyproxy/files')
-rwxr-xr-xopenwrt/package/tinyproxy/files/tinyproxy.init50
1 files changed, 50 insertions, 0 deletions
diff --git a/openwrt/package/tinyproxy/files/tinyproxy.init b/openwrt/package/tinyproxy/files/tinyproxy.init
new file mode 100755
index 0000000..3830d95
--- /dev/null
+++ b/openwrt/package/tinyproxy/files/tinyproxy.init
@@ -0,0 +1,50 @@
+#! /bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+NAME=tinyproxy
+DESC="Tiny HTTP and HTTPS proxy"
+case "$1" in
+ start)
+ if [ -e /var/run/$NAME.pid ]; then
+ echo "$DESC: $NAME already started."
+ exit 0
+ fi
+ echo -n "Starting $DESC: $NAME"
+ test -e /var/run/$NAME.pid || touch /var/run/$NAME.pid
+ /usr/sbin/$NAME
+ echo "."
+ ;;
+
+ stop)
+ if [ ! -e /var/run/$NAME.pid ]; then
+ echo "$DESC: $NAME is not running."
+ exit 0
+ fi
+ echo -n "Stopping $DESC: $NAME"
+ killall $NAME
+ rm -f /var/run/$NAME.pid
+
+ echo "."
+ ;;
+
+ restart|force-reload)
+ if [ ! -e /var/run/$NAME.pid ]; then
+ $0 start
+ exit 0
+ fi
+ echo -n "Restarting $DESC: $NAME"
+ killall $NAME
+ sleep 1
+/usr/sbin/$NAME
+ echo "."
+ ;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+
+esac
+
+exit 0 \ No newline at end of file