[debian-edu-commits] debian-edu/pkg-team/ 07/10: debian/gosa.postinst: Only create Apache2.2 symlinks if Apache2.4 conf-available folder is not present.

Mike Gabriel sunweaver at debian.org
Mon May 19 06:43:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository gosa.

commit dd11c7daf6aadaf69467ce2c632bf570a9051884
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun May 18 20:37:46 2014 +0000

    debian/gosa.postinst: Only create Apache2.2 symlinks if Apache2.4 conf-available folder is not present.
---
 debian/gosa.postinst | 58 +++++++++++++++++++++++++++-------------------------
 1 file changed, 30 insertions(+), 28 deletions(-)

diff --git a/debian/gosa.postinst b/debian/gosa.postinst
index 552867f..405ff57 100755
--- a/debian/gosa.postinst
+++ b/debian/gosa.postinst
@@ -35,29 +35,30 @@ if [ ! -f /etc/gosa/gosa.secrets ]; then
 	chmod 600 /etc/gosa/gosa.secrets
 fi
 
-if [ -d /etc/apache2/conf.d ]; then
+# Apache2.4 / conf-available
+if [ -d /etc/apache2/conf-available ] ; then
 
-	# Copy GOsa configuration to conf.d directories
-	if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then
+	# Copy GOsa configuration to conf-available directory /etc/apache2/conf-available
+	if [ ! -L /etc/apache2/conf-available/gosa.conf ]; then
 
 		# Remove old instances of this file
-		if [ -f /etc/apache2/conf.d/gosa.conf ]; then
-			echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..."
-			echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!"
-			mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig
+		if [ -f /etc/apache2/conf-available/gosa.conf ]; then
+			echo "Found old gosa apache configuration in /etc/apache2/conf-available/gosa.conf - moving it to /etc/apache2/conf-available/gosa.conf.orig ..."
+			echo "Please check for changes in /etc/apache2/conf-available/gosa.conf.orig if you modified this file!"
+			mv /etc/apache2/conf-available/gosa.conf /etc/apache2/conf-available/gosa.conf.orig
 		fi
 
-		echo "Making /gosa available in /etc/apache2/conf.d"
+		echo "Making /gosa available in /etc/apache2/conf-available"
 
 		# Add GOsa include file
-		ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf
+		ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf-available/gosa.conf
 	fi
 
-	# Add support for RequestHeader
-	if [ -x /usr/sbin/a2enmod ]; then
-		a2enmod headers
+	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+		. /usr/share/apache2/apache2-maintscript-helper
+		apache2_invoke enconf gosa
+		apache2_invoke enmod headers
 	fi
-
 	# Finally restart servers
 	if [ -x /usr/sbin/apache2 ]; then
 		if [ -x /usr/sbin/invoke-rc.d ]; then
@@ -66,32 +67,31 @@ if [ -d /etc/apache2/conf.d ]; then
 			/etc/init.d/apache2 reload
 		fi
 	fi
-fi
 
-# conf-available
-if [ -d /etc/apache2/conf-available ] ; then
+# Apache2.2 / deprecated conf.d (for wheezy-backports)
+elif [ -d /etc/apache2/conf.d ]; then
 
-	# Copy GOsa configuration to conf-available directory /etc/apache2/conf-available
-	if [ ! -L /etc/apache2/conf-available/gosa.conf ]; then
+	# Copy GOsa configuration to conf.d directories
+	if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then
 
 		# Remove old instances of this file
-		if [ -f /etc/apache2/conf-available/gosa.conf ]; then
-			echo "Found old gosa apache configuration in /etc/apache2/conf-available/gosa.conf - moving it to /etc/apache2/conf-available/gosa.conf.orig ..."
-			echo "Please check for changes in /etc/apache2/conf-available/gosa.conf.orig if you modified this file!"
-			mv /etc/apache2/conf-available/gosa.conf /etc/apache2/conf-available/gosa.conf.orig
+		if [ -f /etc/apache2/conf.d/gosa.conf ]; then
+			echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..."
+			echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!"
+			mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig
 		fi
 
-		echo "Making /gosa available in /etc/apache2/conf-available"
+		echo "Making /gosa available in /etc/apache2/conf.d"
 
 		# Add GOsa include file
-		ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf-available/gosa.conf
+		ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf
 	fi
 
-	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
-		. /usr/share/apache2/apache2-maintscript-helper
-		apache2_invoke enconf gosa
-		apache2_invoke enmod headers
+	# Add support for RequestHeader
+	if [ -x /usr/sbin/a2enmod ]; then
+		a2enmod headers
 	fi
+
 	# Finally restart servers
 	if [ -x /usr/sbin/apache2 ]; then
 		if [ -x /usr/sbin/invoke-rc.d ]; then
@@ -102,6 +102,8 @@ if [ -d /etc/apache2/conf-available ] ; then
 	fi
 fi
 
+
+# for lighttpd...
 if [ -d /etc/lighttpd/conf-available ]; then
 
 	# Copy GOsa configuration to conf-available directories /etc/lighttpd/conf-available

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa.git



More information about the debian-edu-commits mailing list