diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-01-28 01:40:49 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-01-28 01:40:49 +0000 |
commit | 5a0f8adb0f38d725722380e3fd63228f1f917ed4 (patch) | |
tree | 1b4ae9bb212695393f87621c96d0be382097a6ac /package/tinyproxy/files | |
parent | 6a25fe644778c1a2a4bc97655a6024eda12215ea (diff) |
Addded tinyproxy : lightweight HTTP/HTTPS proxy with support for transparent proxying
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3059 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/tinyproxy/files')
-rwxr-xr-x | package/tinyproxy/files/tinyproxy.init | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/package/tinyproxy/files/tinyproxy.init b/package/tinyproxy/files/tinyproxy.init new file mode 100755 index 000000000..3830d95a4 --- /dev/null +++ b/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 |