summaryrefslogtreecommitdiffstats
path: root/network/polipo/rc.polipo
diff options
context:
space:
mode:
Diffstat (limited to 'network/polipo/rc.polipo')
-rw-r--r--network/polipo/rc.polipo30
1 files changed, 30 insertions, 0 deletions
diff --git a/network/polipo/rc.polipo b/network/polipo/rc.polipo
new file mode 100644
index 0000000000..c08ae73250
--- /dev/null
+++ b/network/polipo/rc.polipo
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Force the pid file to a known location
+PIDFILE="/var/run/polipo/polipo.pid"
+
+start() {
+ echo "Starting polipo..."
+ polipo daemonise=true pidFile=$PIDFILE
+}
+
+stop() {
+ echo "Stopping polipo..."
+ kill `cat $PIDFILE`
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ *)
+ echo "Usage: $0 (start|stop|restart)"
+esac