SOURCES: perlbal.init (NEW), perlbal.sysconfig (NEW), Perlbal-no_u...

radek radek at pld-linux.org
Sun Sep 16 19:14:30 CEST 2007


Author: radek                        Date: Sun Sep 16 17:14:30 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   perlbal.init (NONE -> 1.1)  (NEW), perlbal.sysconfig (NONE -> 1.1)  (NEW), Perlbal-no_use_lib.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/perlbal.init
diff -u /dev/null SOURCES/perlbal.init:1.1
--- /dev/null	Sun Sep 16 19:14:30 2007
+++ SOURCES/perlbal.init	Sun Sep 16 19:14:25 2007
@@ -0,0 +1,95 @@
+#!/bin/sh
+#
+# perlbal	Perlbal - Reverse-proxy load balancer and webserver
+#
+# chkconfig:	345 86 13
+#
+# description:	Perlbal - Reverse-proxy load balancer and webserver
+#
+# processname:	perlbal
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+[ -f /etc/sysconfig/perlbal ] && . /etc/sysconfig/perlbal
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+		msg_network_down perlbal
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+start() {
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/perlbal ]; then
+		msg_starting perlbal
+		daemon perlbal $PERLBAL_OPTS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/perlbal
+	else
+		msg_already_running perlbal
+	fi
+}
+
+stop() {
+	if [ -f /var/lock/subsys/perlbal ]; then
+		# Stop daemons.
+		msg_stopping perlbal
+		killproc perlbal
+		rm -f /var/lock/subsys/perlbal
+	else
+		msg_not_running perlbal
+	fi
+}
+
+reload() {
+	if [ -f /var/lock/subsys/perlbal ]; then
+		msg_reloading perlbal
+		killproc perlbal -HUP
+		RETVAL=$?
+	else
+		msg_not_running perlbal
+		RETVAL=7
+	fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+	stop
+	start
+	;;
+  reload)
+  	reload
+	;;
+# ONLY if program allows reloading without stopping
+# otherwise include force-reload with 'reload'
+  force-reload)
+	reload
+	;;
+  status)
+	status perlbal
+	RETVAL=$?
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+	exit 3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/perlbal.sysconfig
diff -u /dev/null SOURCES/perlbal.sysconfig:1.1
--- /dev/null	Sun Sep 16 19:14:30 2007
+++ SOURCES/perlbal.sysconfig	Sun Sep 16 19:14:25 2007
@@ -0,0 +1,7 @@
+# $Id$
+
+#PERLBAL_OPTS="--daemon --config=/etc/perlbal/perlbal.conf"
+PERLBAL_OPTS="--daemon --config=/etc/perlbal/echoservice.conf"
+
+# SERVICE_NICE_RUN_LEVEL=5
+

================================================================
Index: SOURCES/Perlbal-no_use_lib.patch
diff -u /dev/null SOURCES/Perlbal-no_use_lib.patch:1.1
--- /dev/null	Sun Sep 16 19:14:30 2007
+++ SOURCES/Perlbal-no_use_lib.patch	Sun Sep 16 19:14:25 2007
@@ -0,0 +1,11 @@
+--- Perlbal-1.59/perlbal~	2006-11-03 23:30:51.000000000 +0000
++++ Perlbal-1.59/perlbal	2007-09-16 18:00:38.637075003 +0100
+@@ -30,7 +30,7 @@
+ 
+ use strict;
+ use warnings;
+-use lib 'lib';
++#use lib 'lib';
+ use Perlbal;
+ 
+ my $opt_daemonize;
================================================================


More information about the pld-cvs-commit mailing list