On 05/26/2016 06:05 AM, James Valleroy wrote:
> Package: freedombox-setup
> Severity: wishlist
> Tags: patch
> 
> This module allows users to share files which are placed in ~/public_html. I
> suggest enabling the module here, to avoid needing to restart apache later.
> 

Looks good to me.  I am committing this patch.  However, I think we
should also do this for user upgrading to the new version.  The attached
patch takes care of upgrading.

-- 
Sunil

From bf00fd5196d4e3eb520fc73ed3229d0c40ff9400 Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa <su...@medhas.org>
Date: Sat, 4 Jun 2016 18:16:00 +0530
Subject: [PATCH 2/2] Enable userdir for users upgrading from <= 0.9.1

---
 debian/freedombox-setup.postinst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/debian/freedombox-setup.postinst b/debian/freedombox-setup.postinst
index 533824d..268a828 100644
--- a/debian/freedombox-setup.postinst
+++ b/debian/freedombox-setup.postinst
@@ -51,4 +51,14 @@ if [ "$1" = "configure" ] && [ -f /etc/motd ] && [ ! -L /etc/motd ] ; then
     ln -s ../var/run/motd /etc/motd
 fi
 
+# Enable userdir Apache module when upgrading from olders version to
+# 0.9.2 or above
+if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+    . /usr/share/apache2/apache2-maintscript-helper
+
+    if dpkg --compare-versions "$2" le-nl "0.9.1" ; then
+        apache2_invoke enmod userdir
+    fi
+fi
+
 #DEBHELPER#
-- 
2.8.1

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to