[csw-devel] SF.net SVN: gar:[13031] csw/mgar/pkg/apache2/branches/open-bug-squash

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Fri Jan 21 04:05:25 CET 2011


Revision: 13031
          http://gar.svn.sourceforge.net/gar/?rev=13031&view=rev
Author:   bdwalton
Date:     2011-01-21 03:05:24 +0000 (Fri, 21 Jan 2011)

Log Message:
-----------
apache2/branches/open-bug-squash: add a postinstall script for ap2_worker; Mantis 4580

Modified Paths:
--------------
    csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile

Added Paths:
-----------
    csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postinstall

Modified: csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile
===================================================================
--- csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile	2011-01-21 02:18:15 UTC (rev 13030)
+++ csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile	2011-01-21 03:05:24 UTC (rev 13031)
@@ -38,6 +38,7 @@
 DISTFILES += CSWapache2.killproc cswapache2
 
 DISTFILES += CSWapache2.preinstall CSWapache2.postinstall
+DISTFILES += CSWap2workser.postinstall
 
 # Configuration templates
 DISTFILES += update20to22

Added: csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postinstall
===================================================================
--- csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postinstall	                        (rev 0)
+++ csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postinstall	2011-01-21 03:05:24 UTC (rev 13031)
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+	# Source csw.conf, if it exists
+if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then
+    . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf
+fi
+if [ -f $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf ] ; then
+    . $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf
+fi
+
+# Determine if service should be started or not
+daemon=yes
+if [ "$autoenable_daemons" = "no" ]; then
+    daemon=no
+fi
+
+if [ "$autoenable_cswapache2" = "no" ]; then
+
+    daemon=no
+elif [ "$autoenable_cswapache2" = "yes" ]; then
+    daemon=yes
+fi
+
+if [ "$daemon" = "yes" ]; then
+    # Determine if SMF should be used or not
+    smf=no
+
+    if [ "$use_smf" = "no" ]; then
+	smf=no
+    else
+	if [ -f /usr/sbin/svccfg -a -f /usr/sbin/svcadm ]; then
+	    smf=yes
+	fi
+    fi
+
+    if [ "$smf" = "yes" ]; then
+	svcadm restart cswapache2
+    else
+	/etc/init.d/cswapache2 restart
+    fi
+fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list