[svn] r6375 - trunk/rpms/pound

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Sun Jun 22 16:40:31 CEST 2008


Author: dries
Date: 2008-06-22 15:40:31 +0100 (Sun, 22 Jun 2008)
New Revision: 6375

Added:
   trunk/rpms/pound/pound.cfg
   trunk/rpms/pound/pound.init
Modified:
   trunk/rpms/pound/pound.spec
Log:
update + initscripts added, thanks to Thomas M Steenholdt

Added: trunk/rpms/pound/pound.cfg
===================================================================
--- trunk/rpms/pound/pound.cfg	                        (rev 0)
+++ trunk/rpms/pound/pound.cfg	2008-06-22 14:40:31 UTC (rev 6375)
@@ -0,0 +1,60 @@
+User        "nobody"
+Group       "nobody"
+#RootJail    "/var/pound/jail"
+#Alive       60
+
+## Main listening ports
+#ListenHTTP
+#    Address 1.2.3.4
+#    Port    80
+#    Client  10
+#End
+#ListenHTTPS
+#    Address 1.2.3.4
+#    Port    443
+#    Cert    "/etc/pound/pound.pem"
+#    Client  20
+#End
+
+## Image server
+#Service
+#    URL ".*.(jpg|gif)"
+#    BackEnd
+#        Address 192.168.0.10
+#        Port    80
+#    End
+#End
+## Virtual host www.myserver.com
+#Service
+#    URL         ".*sessid=.*"
+#    HeadRequire "Host:.*www.myserver.com.*"
+#    BackEnd
+#        Address 192.168.0.11
+#        Port    80
+#    End
+#    Session
+#        Type    URL
+#        ID      "sessid"
+#        TTL     120
+#    End
+#End
+
+## Everybody else
+#Service
+#    BackEnd
+#        Address 192.168.0.20
+#        Port    80
+#        Priority 5
+#    End
+#    BackEnd
+#        Address 192.168.0.21
+#        Port    80
+#        Priority 4
+#    End
+#    Session
+#        Type    COOKIE
+#        ID      "userid"
+#        TTL     180
+#    End
+#End
+

Added: trunk/rpms/pound/pound.init
===================================================================
--- trunk/rpms/pound/pound.init	                        (rev 0)
+++ trunk/rpms/pound/pound.init	2008-06-22 14:40:31 UTC (rev 6375)
@@ -0,0 +1,87 @@
+#!/bin/bash
+#
+# Init file for Pound - Reverse-Proxy and Load-Balancer
+#
+# chkconfig: - 60 20
+# description: Pound - Reverse-Proxy and Load-Balancer
+#
+# processname: pound
+# config: /etc/pound.conf
+# pidfile: /var/run/pound.pid
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+prog="pound"
+
+# Some functions to make the below more readable
+POUND=/usr/sbin/pound
+PID_FILE=/var/run/pound.pid
+OPTIONS=""
+
+# pull in sysconfig settings
+#[ -f /etc/sysconfig/pound ] && . /etc/sysconfig/pound
+
+runlevel=$(set -- $(runlevel); eval "echo \$$#" )
+
+start()
+{
+	echo -n $"Starting $prog: "
+	$POUND $OPTIONS &>/dev/null && success || failure
+	RETVAL=$?
+	[ "$RETVAL" = 0 ] && touch /var/lock/subsys/$prog
+	echo
+}
+
+stop()
+{
+	echo -n $"Stopping $prog: "
+	if [ -n "`pidfileofproc $POUND`" ] ; then
+	    killproc $POUND
+	else
+	    failure $"Stopping $prog"
+	fi
+	RETVAL=$?
+	# if we are in halt or reboot runlevel kill all running sessions
+	# so the TCP connections are closed cleanly
+	if [ "x$runlevel" = x0 -o "x$runlevel" = x6 ] ; then
+	    killall $prog 2>/dev/null
+	fi
+	[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/$prog
+	echo
+}
+
+case "$1" in
+	start)
+		status $POUND &>/dev/null
+		if [ $? -ne 0 ]; then
+			start
+		fi
+		;;
+	stop)
+		stop
+		;;
+	restart)
+		stop
+		start
+		;;
+	reload)
+		stop
+		start
+		;;
+	condrestart)
+		if [ -f /var/lock/subsys/$prog ] ; then
+			stop
+			start
+		fi
+		;;
+	status)
+		status $POUND
+		RETVAL=$?
+		;;
+	*)
+		echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
+		RETVAL=1
+esac
+exit $RETVAL


Property changes on: trunk/rpms/pound/pound.init
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/rpms/pound/pound.spec
===================================================================
--- trunk/rpms/pound/pound.spec	2008-06-22 14:23:46 UTC (rev 6374)
+++ trunk/rpms/pound/pound.spec	2008-06-22 14:40:31 UTC (rev 6375)
@@ -4,13 +4,15 @@
 
 Summary: Reverse HTTP proxy, load balancer and SSL wrapper
 Name: pound
-Version: 2.4.1
+Version: 2.4.3
 Release: 1
 License: GPL
 Group: Applications/Internet
 URL: http://www.apsis.ch/pound/index.html
 
 Source: http://www.apsis.ch/pound/Pound-%{version}.tgz
+Source1: pound.init
+Source2: pound.cfg
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: openssl-devel, pkgconfig
@@ -37,9 +39,20 @@
 
 %install
 %{__rm} -rf %{buildroot}
-%{__install} -d %{buildroot}%{_sbindir} %{buildroot}%{_mandir}
+%{__install} -d %{buildroot}%{_sbindir} %{buildroot}%{_mandir}  %{buildroot}%{_sysconfdir}/init.d
 %{__make} install DESTDIR=%{buildroot}
+%{__install} %{_sourcedir}/pound.init %{buildroot}%{_sysconfdir}/init.d/pound
+%{__install} %{_sourcedir}/pound.cfg %{buildroot}%{_sysconfdir}/pound.cfg
 
+%post
+/sbin/chkconfig --add pound
+
+%preun
+if [ $1 -eq 0 ]; then
+	/sbin/service pound stop >/dev/null 2>&1
+	/sbin/chkconfig --del pound
+fi
+
 %clean
 %{__rm} -rf %{buildroot}
 
@@ -50,8 +63,14 @@
 %doc %{_mandir}/man8/poundctl.8*
 %{_sbindir}/pound
 %{_sbindir}/poundctl
+%{_sysconfdir}/init.d/pound
+%config %{_sysconfdir}/pound.cfg
 
 %changelog
+* Fri Jun 20 2008 Thomas M Steenholdt <tmus at tmus.dk> - 2.4.3-1
+- Updated to release 2.4.3
+- Added initscript and default pound.cfg (intentionally non-working as provided)
+
 * Thu Apr 17 2008 Dag Wieers <dag at wieers.com> - 2.4.1-1
 - Updated to release 2.4.1.
 



More information about the svn-commits mailing list