#!/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 gprintf "pound: already running\n" 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 ;; *) gprintf "%s {start|stop|restart|status}\n" "$0" exit 1 ;; esac exit $RETVAL