[csw-devel] SF.net SVN: gar:[11611] csw/mgar/pkg/apache2/trunk/files/build_cas_template

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Sun Nov 14 23:54:13 CET 2010


Revision: 11611
          http://gar.svn.sourceforge.net/gar/?rev=11611&view=rev
Author:   bdwalton
Date:     2010-11-14 22:54:13 +0000 (Sun, 14 Nov 2010)

Log Message:
-----------
apache2: correct the CAS building script

Modified Paths:
--------------
    csw/mgar/pkg/apache2/trunk/files/build_cas_template

Modified: csw/mgar/pkg/apache2/trunk/files/build_cas_template
===================================================================
--- csw/mgar/pkg/apache2/trunk/files/build_cas_template	2010-11-14 22:33:03 UTC (rev 11610)
+++ csw/mgar/pkg/apache2/trunk/files/build_cas_template	2010-11-14 22:54:13 UTC (rev 11611)
@@ -3,17 +3,17 @@
 cat <<EOF
 #!/bin/sh
 
-if [ "\$1" = install ]; then
 PIR=\${PKG_INSTALL_ROOT:-/}
 AP2_DIR=\$PIR/opt/csw/apache2
 AP2_CONF=\$AP2_DIR/etc/
 
 CONF_FILE=\$AP2_CONF/$1
 
-if [ ! -f "\$CONF_FILE" ]; then
-   cp -p \$CONF_FILE.CSW \$CONF_FILE
-   host=\`hostname\`
-   perl -pi \
+if [ "\$1" = install ]; then
+   if [ ! -f "\$CONF_FILE" ]; then
+      cp -p \$CONF_FILE.CSW \$CONF_FILE
+      host=\`hostname\`
+      perl -pi \
    	-e "s/#*ServerName www.example.com(80|443)/ServerName \$host:\\\$1/;" \
 	-e "s/#*ServerAdmin you\@example.com/ServerAdmin root@\$host/;" \
 	-e "s/^User.*daemon/User nobody/;" \
@@ -21,6 +21,7 @@
 	-e "s/^(LoadModule.*suexec.*)/#\$1/;" \
 	-e "s/^#(Include.*httpd-mpm.conf)/\$1/;" \
 	-e "s/^#(Include.*httpd-ssl.conf)/\$1/;" \$CONF_FILE
+   fi
 else
    # preserve ourselves with no changes
    cat \$CONF_FILE


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