[csw-devel] SF.net SVN: gar:[11884] csw/mgar/pkg/apache2/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Sun Dec 12 02:30:26 CET 2010
Revision: 11884
http://gar.svn.sourceforge.net/gar/?rev=11884&view=rev
Author: bdwalton
Date: 2010-12-12 01:30:26 +0000 (Sun, 12 Dec 2010)
Log Message:
-----------
apache2: stop httpd.worker prior to ap2_worker removal
Modified Paths:
--------------
csw/mgar/pkg/apache2/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/apache2/trunk/files/CSWap2worker.preremove
Modified: csw/mgar/pkg/apache2/trunk/Makefile
===================================================================
--- csw/mgar/pkg/apache2/trunk/Makefile 2010-12-11 23:58:46 UTC (rev 11883)
+++ csw/mgar/pkg/apache2/trunk/Makefile 2010-12-12 01:30:26 UTC (rev 11884)
@@ -37,7 +37,8 @@
# Standard package bits
DISTFILES += CSWapache2.killproc cswapache2
-DISTFILES += CSWapache2.preinstall CSWap2worker.postinstall
+DISTFILES += CSWapache2.preinstall
+DISTFILES += CSWap2worker.postinstall CSWap2worker.preremove
# Configuration templates
DISTFILES += update20to22
Added: csw/mgar/pkg/apache2/trunk/files/CSWap2worker.preremove
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/CSWap2worker.preremove (rev 0)
+++ csw/mgar/pkg/apache2/trunk/files/CSWap2worker.preremove 2010-12-12 01:30:26 UTC (rev 11884)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Stop httpd.worker prior to removal
+
+CSW_PREFIX=/opt/csw
+AP2_PREFIX=$CSW_PREFIX/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_HTTPD=$AP2_BINDIR/httpd
+AP2_CTRL=$AP2_BINDIR/apachectl
+AP2_CONF=/etc/opt/csw/apache2/httpd.conf
+SVCADM=/usr/sbin/svcadm
+
+[ ! -f "$AP2_CONF" ] && exit 0
+
+if [ -n "`pgrep -f apache2/sbin/httpd`" ]; then
+ if [ -x "$AP2_HTTPD" ]; then
+ if [ -x "$SVCADM" ]; then
+ $SVCADM disable cswapache2
+ elif [ -x "$AP2_CTRL" ]; then
+ $AP2_CTRL -k stop
+ fi
+ sleep 2
+ fi
+fi
+
+exit 0
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