#!/bin/bash # # perlbal This shell script starts the Perlbal load-balancer # # Author: Ruben Kerkhof # # chkconfig: - 85 15 # # description: Perlbal is a reverse proxy and load-balancer # processname: perlbal # config: /etc/perlbal/perlbal.conf # pidfile: /var/run/perlbal.pid # # source function library . /etc/rc.d/init.d/functions start() { echo -n $"Starting Perlbal: " daemon perlbal --daemon RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/perlbal return $RETVAL } stop() { echo -n $"Stopping Perlbal: " killproc perlbal RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/perlbal return $RETVAL } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|force-reload|reload) restart ;; condrestart) [ -f /var/lock/subsys/perlbal ] && restart ;; status) status perlbal ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" exit 2 esac exit $?