[prev in list] [next in list] [prev in thread] [next in thread]
List: opencsw-devel
Subject: [csw-devel] SF.net SVN: gar:[11096] csw/mgar/pkg/cswclassutils/trunk/files
From: bdwalton () users ! sourceforge ! net (bdwalton at users ! sourceforge ! net)
Date: 2010-09-30 1:43:25
Message-ID: E1P18BB-0007xH-CP () sfp-svn-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 11096
http://gar.svn.sourceforge.net/gar/?rev=11096&view=rev
Author: bdwalton
Date: 2010-09-30 01:43:25 +0000 (Thu, 30 Sep 2010)
Log Message:
-----------
cswclassutils: add i/r scripts for apache module install/uninstall
Added Paths:
-----------
csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswap2mod
csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswap2mod
Added: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswap2mod
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswap2mod \
(rev 0)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswap2mod 2010-09-30 \
01:43:25 UTC (rev 11096) @@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# i.cswap2mod - Class action script for installing apache2 modules
+#
+# $Id$
+#
+# Written by Ben Walton
+#
+# 2010-09-29 First Release
+#
+
+AP2_PREFIX=/opt/csw/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_LIBEXEC=$AP2_PREFIX/libexec
+AP2_CONFDIR=$AP2_PREFIX/etc
+AP2_CONFIG=$AP2_CONFDIR/httpd.conf
+AP2_APXS=$AP2_BINDIR/apxs
+
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+
+while read src dest; do
+ # Place the file first
+ /usr/bin/cp -p $src $dest || exit 2
+ echo $dest
+
+ CONF=$PKG_INSTALL_ROOT/$AP2_CONFIG
+ APXS=$PKG_INSTALL_ROOT/$AP2_APXS
+ MODFILE=`basename $dest`
+ MODNAME=`echo $MODFILE | sed 's/mod_//; s/\.so$//'`
+
+ # This check ensures we have an httpd.conf where we expect it
+ # and that apxs is available. This (hopefully) prevents us from
+ # doing anything if the local system has completely reworked the
+ # etc/ file structure
+ if [ -f "$CONF" -a -x "$APXS" ]; then
+ # Enable the module
+ chroot $PKG_INSTALL_ROOT \
+ $APXS -e -a -n $MODNAME $MODFILE
+ cat <<END
+
+
+NOTICE: The $MODNAME module was enabled in httpd.conf but the server
+was not restarted. Please modify httpd.conf as appropriate and
+restart apache.
+
+
+END
+ fi
+done
+
+exit 0
Property changes on: \
csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswap2mod \
___________________________________________________________________
Added: svn:keywords
+ Id
Added: csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswap2mod
===================================================================
--- csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswap2mod \
(rev 0)
+++ csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswap2mod 2010-09-30 \
01:43:25 UTC (rev 11096) @@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# r.cswap2mod - Class action script for removing apache2 modules
+#
+# $Id$
+#
+# Written by Ben Walton
+#
+# 2010-09-29 First Release
+#
+
+AP2_PREFIX=/opt/csw/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_LIBEXEC=$AP2_PREFIX/libexec
+AP2_CONFDIR=$AP2_PREFIX/etc
+AP2_CONFIG=$AP2_CONFDIR/httpd.conf
+AP2_APXS=$AP2_BINDIR/apxs
+
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+
+while read dest; do
+ echo $dest
+
+ CONF=$PKG_INSTALL_ROOT/$AP2_CONFIG
+ APXS=$PKG_INSTALL_ROOT/$AP2_APXS
+ MODFILE=`basename $dest`
+ MODNAME=`echo $MODFILE | sed 's/mod_//; s/\.so$//'`
+
+ # This check ensures we have an httpd.conf where we expect it
+ # and that apxs is available. This (hopefully) prevents us from
+ # doing anything if the local system has completely reworked the
+ # etc/ file structure
+ if [ -f "$CONF" -a -x "$APXS" ]; then
+ # Disable the module
+ chroot $PKG_INSTALL_ROOT \
+ $APXS -e -A -n $MODNAME $MODFILE
+ cat <<END
+
+
+NOTICE: The $MODNAME module was disabled in httpd.conf but the server
+was not restarted. Please modify httpd.conf as appropriate and
+restart apache.
+
+
+END
+ fi
+
+ # Now actually remove the file.
+ /usr/bin/rm -f $dest || exit 2
+
+done
+
+exit 0
Property changes on: \
csw/mgar/pkg/cswclassutils/trunk/files/CSWcswclassutils.r.cswap2mod \
___________________________________________________________________
Added: svn:keywords
+ Id
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic