Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37883919
en ru br
ALT Linux repos
S:1.1.1-alt2.1
5.0: 1.0.4-alt1
4.1: 1.0.4-alt1

Group :: System/Servers
RPM: polipo

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# polipo This shell script takes care of starting and stopping
# Polipo HTTP proxy.
#
# chkconfig: 2345 90 25
# description: Polipo is single-threaded, non blocking HTTP proxy. It listens to
# requests for web pages from your browser and forwards them to web
# servers, and forwards the servers' replies to your browser. In the
# process, it optimises and cleans up the network traffic.
# processname: polipo
# config: /etc/polipo/config
# pidfile: /var/run/polipo.pid

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

PIDFILE=/var/run/polipo.pid
LOCKFILE=/var/lock/subsys/polipo
RETVAL=0

start()
{
start_daemon --make-pidfile --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- polipo
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- polipo
RETVAL=$?
return $RETVAL
}

restart()
{
stop
start
}

reload()
{
msg_reloading Polipo
stop_daemon --pidfile "$PIDFILE" --expect-user root -USR2 -- polipo
RETVAL=$?
return $RETVAL
}

condreload()
{
msg_reloading Polipo
stop_daemon --pidfile "$PIDFILE" --expect-user root -USR1 -- polipo
RETVAL=$?
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
condreload
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root -- polipo
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin