summaryrefslogtreecommitdiff
path: root/network/polipo/rc.polipo
diff options
context:
space:
mode:
authorMarco Bonetti <sid77@slackware.it>2010-05-12 23:32:41 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 23:32:41 +0200
commit54fed56da4e8d0f76e8cf9eac9ac54b09c6a6390 (patch)
tree055325f19c4cd9e1e55a51679331323ef17db713 /network/polipo/rc.polipo
parent045310e29ea3fe6b68510d9a2a3b96b6588f7248 (diff)
downloadslackbuilds-54fed56da4e8d0f76e8cf9eac9ac54b09c6a6390.tar.gz
network/polipo: Added to 12.2 repository
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