slackbuilds_ponce/network/polipo/rc.polipo
Brenton Earl 71cd6add2c network/polipo: Updated for version 1.1.1.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2015-11-14 07:07:34 +07:00

31 lines
430 B
Bash

#!/bin/sh
# Force the pid file to a known location
PIDFILE="/var/run/polipo/polipo.pid"
start() {
echo "Starting polipo..."
mkdir -p $(dirname $PIDFILE)
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