Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-backports-src > by-pkgid > b70322fe6d353cd6a08db9079dbc37a3 > files > 4

pound-2.6-1mdv2010.2.src.rpm

#!/bin/bash
#
# pound	        This shell script starts and stops pound
#
# chkconfig: 345 85 15
# description:	The Pound program is a reverse proxy, load balancer and HTTPS
# front-end for Web server(s)
# probe: false

# Comments to support LSB init script conventions
### BEGIN INIT INFO
# Required-Start: $network
# Requires-Stop: $network
# Default-Start:  3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop pound
# Description: The Pound program is a reverse proxy, load balancer and HTTPS front-end for Web server(s)
### END INIT INFO

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

# Get network config
. /etc/sysconfig/network

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

# Get service config
[ -f /etc/sysconfig/pound ] && . /etc/sysconfig/pound

# See how we were called.
case "$1" in
  start)
	# Check if the service is already running?
	if [ -n "`/sbin/pidof pound`" ]; then
            echo "pound: already running"
	    echo
            exit 1
        fi
	# Start daemons.
	daemon pound ${OPTIONS}
	RETVAL=$?
	[ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/pound
        echo
	;;
  stop)
        # Stop daemons.
	killproc pound
	RETVAL=$?
        [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/pound
        echo
	;;
  status)
	status pound
	RETVAL=$?
	exit $RETVAL
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
	echo "$0 {start|stop|restart|status}"
	exit 1
	;;
esac

exit $RETVAL