[csw-devel] SF.net SVN: gar:[13049] csw/mgar/pkg/apache2/branches/open-bug-squash
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Sat Jan 22 02:04:19 CET 2011
Revision: 13049
http://gar.svn.sourceforge.net/gar/?rev=13049&view=rev
Author: bdwalton
Date: 2011-01-22 01:04:19 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
apache2/branches/open-bug-squash: add a postremove 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.postremove
Modified: csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile
===================================================================
--- csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile 2011-01-21 18:07:27 UTC (rev 13048)
+++ csw/mgar/pkg/apache2/branches/open-bug-squash/Makefile 2011-01-22 01:04:19 UTC (rev 13049)
@@ -38,7 +38,7 @@
DISTFILES += CSWapache2.killproc cswapache2
DISTFILES += CSWapache2.preinstall CSWapache2.postinstall
-DISTFILES += CSWap2worker.postinstall
+DISTFILES += CSWap2worker.postinstall CSWap2worker.postremove
# Configuration templates
DISTFILES += update20to22
Added: csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postremove
===================================================================
--- csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postremove (rev 0)
+++ csw/mgar/pkg/apache2/branches/open-bug-squash/files/CSWap2worker.postremove 2011-01-22 01:04:19 UTC (rev 13049)
@@ -0,0 +1,30 @@
+#!/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
+
+# On removal of the worker mpm, restart apache to use the prefork (default)
+# mpm...only if it's currently running though
+if [ -n "`pgrep -f apache2/sbin/httpd`" ]; 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