summaryrefslogtreecommitdiff
path: root/package/polipo/files/polipo.init
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-07-29 17:16:55 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-07-29 17:16:55 +0200
commitba085778e938595ea0807c4f51818df144fd0d92 (patch)
treec90cd94749a7ba5ed0ab8fed627ffa6bcea28a71 /package/polipo/files/polipo.init
parent8961e6674ce327d3a75d05da815a5dfd2f853d11 (diff)
add small http proxy, can be used in combination with tor for non-sockify apps like dillo
Diffstat (limited to 'package/polipo/files/polipo.init')
-rw-r--r--package/polipo/files/polipo.init27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/polipo/files/polipo.init b/package/polipo/files/polipo.init
new file mode 100644
index 000000000..636159337
--- /dev/null
+++ b/package/polipo/files/polipo.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG polipo
+#INIT 85
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${polipo:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/bin/polipo
+ ;;
+stop)
+ kill -15 $(pgrep -f /usr/bin/polipo)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?