0009936: Update via repository doesn´t work (ubuntu)
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 25 Jul 2014 08:30:09 +0000 (10:30 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 25 Jul 2014 08:45:16 +0000 (10:45 +0200)
* php5enmod mcrypt
* apache2: /etc/php5/conf.d has moved to /etc/php5/apache2/conf.d
* apache2: expects config files to match *.conf

https://forge.tine20.org/mantisbt/view.php?id=9936

Change-Id: Ibb94550073222d53cc0033f5dedb5ed714974965
Reviewed-on: http://gerrit.tine20.com/customers/896
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
scripts/packaging/debian/tine20-tinebase.postinst
scripts/packaging/debian/tine20-webstack.postinst
scripts/packaging/debian/tine20-webstack.postrm

index 61fedb7..863ca15 100644 (file)
@@ -10,13 +10,27 @@ if [ "$1" = "configure" ]; then
     done
     
     chown www-data:www-data /var/log/tine20
-    chmod 0750 /var/log/tine20    
+    chmod 0750 /var/log/tine20
     
     # create link used by PHP when running as (fast)cgi
-    if [ ! -f /etc/php5/conf.d/tine20.ini -a ! -h /etc/php5/conf.d/tine20.ini ]; then
-        ln -s /etc/tine20/php5.ini /etc/php5/conf.d/tine20.ini
+    if [ -d /etc/php5/conf.d ]; then
+        if [ ! -f /etc/php5/conf.d/tine20.ini -a ! -h /etc/php5/conf.d/tine20.ini ]; then
+            ln -s /etc/tine20/php5.ini /etc/php5/conf.d/tine20.ini
+        fi
     fi
 
+    # php5 conf.d has moved on ubuntu 14.04
+    if [ -d /etc/php5/apache2/conf.d ]; then
+        # create link used by PHP when running as (fast)cgi
+        if [ ! -f /etc/php5/apache2/conf.d/tine20.ini -a ! -h /etc/php5/apache2/conf.d/tine20.ini ]; then
+            ln -s /etc/tine20/php5.ini /etc/php5/apache2/conf.d/tine20.ini
+        fi
+        
+        # enable mcrypt if not already done
+        if [ ! -f /etc/php5/apache2/conf.d/20-mcrypt.ini ]; then
+            php5enmod mcrypt
+        fi
+    fi
 fi
 
 #DEBHELPER#
\ No newline at end of file
index cb6a33c..97bd8d9 100644 (file)
@@ -59,8 +59,8 @@ if [ "$1" = "configure" ]; then
                 
                 # create Apache 2.x configuration links
                 if [ -d /etc/apache2/conf.d/ ]; then
-                    if [ ! -e /etc/apache2/conf.d/tine20 ]; then
-                        ln -s ../../tine20/apache.conf /etc/apache2/conf.d/tine20
+                    if [ ! -e /etc/apache2/conf.d/tine20.conf ]; then
+                        ln -s ../../tine20/apache.conf /etc/apache2/conf.d/tine20.conf
                     fi
                     
                 elif [ -d /etc/apache2/conf-available ]; then
@@ -71,13 +71,6 @@ if [ "$1" = "configure" ]; then
                     /usr/sbin/a2enconf tine20
                 fi
                 
-                #linkdestination_apache="../../tine20/apache.conf"
-                #linkname="tine20"
-                #
-                #if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
-                #    . /usr/share/wwwconfig-common/confd-link.sh
-                #fi
-                
                 # mark webserver for restart (used by restart.sh)
                 servers="apache2"
                 restart="$restart $webserver"
index 17c4df4..a8dfab9 100644 (file)
@@ -42,8 +42,8 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
 
     case "$webserver" in
         apache2)
-            if [ -L /etc/$webserver/conf.d/tine20 ]; then
-                rm -f /etc/$webserver/conf.d/tine20
+            if [ -L /etc/$webserver/conf.d/tine20.conf ]; then
+                rm -f /etc/$webserver/conf.d/tine20.conf
                 
             elif [ -L /etc/$webserver/conf-available/tine20.conf ]; then
                 /usr/sbin/a2disconf tine20