Control: tags -1 + patch

Dear jwchat maintainers

Attached is a patch for your package.

Regards
diff -Nru jwchat-1.0+dfsg/debian/postinst jwchat-1.0+dfsg/debian/postinst
--- jwchat-1.0+dfsg/debian/postinst	2010-09-17 18:11:48.000000000 +0000
+++ jwchat-1.0+dfsg/debian/postinst	2013-07-22 17:34:28.000000000 +0000
@@ -7,7 +7,7 @@
 
 configfile='/etc/jwchat/config.js'
 configsource='/usr/share/jwchat/config.js'
-apachefile='/etc/apache2/sites-available/jwchat'
+apachefile='/etc/apache2/sites-available/jwchat.conf'
 apachesource='/usr/share/jwchat/apache.conf'
 wwwdir='/usr/share/jwchat/www'
 tempfile=$(mktemp)
@@ -38,10 +38,12 @@
 		    $apachesource > $tempfile
 		ucf --three-way --debconf-ok $tempfile $apachefile
 		db_stop
-		a2enmod proxy
-		a2enmod proxy_http
-		a2ensite jwchat
-		invoke-rc.d apache2 force-reload
+		if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+			. /usr/share/apache2/apache2-maintscript-helper
+			apache2_invoke enmod proxy
+			apache2_invoke enmod proxy_http
+			apache2_invoke ensite jwchat
+		fi
 	fi
 }
 
@@ -49,9 +51,8 @@
 	configure|reconfigure)
 
 	fixperms
-	setup_apache
+	setup_apache $@
 	rm -f $tempfile
-	exit 0
 	;;
 
 	*)
diff -Nru jwchat-1.0+dfsg/debian/postrm jwchat-1.0+dfsg/debian/postrm
--- jwchat-1.0+dfsg/debian/postrm	2010-09-17 18:11:48.000000000 +0000
+++ jwchat-1.0+dfsg/debian/postrm	2013-07-22 17:44:45.000000000 +0000
@@ -6,14 +6,14 @@
 set -e
 
 configfile='/etc/jwchat/config.js'
-apachefile='/etc/apache2/sites-available/jwchat'
+apachefile='/etc/apache2/sites-available/jwchat.conf'
 
 case "$1" in
 	remove)
 
-	if [ -x /usr/sbin/a2dissite -a -x /etc/init.d/apache2 -a -L /etc/apache2/sites-enabled/jwchat ]; then
-		a2dissite jwchat
-		invoke-rc.d apache2 force-reload
+	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+		. /usr/share/apache2/apache2-maintscript-helper
+		apache2_invoke dissite jwchat
 	fi
 	;;
 

Reply via email to