Zhang Huangbin avatar Zhang Huangbin committed 10f1338

Improve Ubuntu-13.10 (saucy) support, but it's not completed due to package missing: libapache2-mod-auth-mysql.
This package missing is a bug reported in LaunchPad: https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1243076

Comments (0)

Files changed (4)

iRedMail/conf/apache_php

     # Apache configuration files.
     export HTTPD_CONF_ROOT="/etc/apache2"
     export HTTPD_CONF="${HTTPD_CONF_ROOT}/apache2.conf"
-    export HTTPD_CONF_DIR="${HTTPD_CONF_ROOT}/conf.d"
-    export HTTPD_SSL_CONF="${HTTPD_CONF_ROOT}/sites-available/default-ssl"
+    if [ X"${DISTRO_CODENAME}" == X'wheezy' \
+        -o X"${DISTRO_CODENAME}" == X'precise' \
+        -o X"${DISTRO_CODENAME}" == X'raring' ]; then
+        export HTTPD_CONF_DIR="${HTTPD_CONF_ROOT}/conf.d"
+        export HTTPD_SSL_CONF="${HTTPD_CONF_ROOT}/sites-available/default-ssl"
+        export HTTPD_MOD_CONF_SECURITY="${HTTPD_CONF_DIR}/security"
+    else
+        export HTTPD_CONF_DIR="${HTTPD_CONF_ROOT}/conf-available"
+        export HTTPD_SSL_CONF="${HTTPD_CONF_ROOT}/sites-available/default-ssl.conf"
+        export HTTPD_MOD_CONF_SECURITY="${HTTPD_CONF_DIR}/security.conf"
+    fi
 
     # Web data.
     export HTTPD_SERVERROOT='/usr/share/apache2'

iRedMail/conf/global

         # Ubuntu version number and code name:
         #   - 12.04: precise (Long Term support by Ubuntu)
         #   - 13.04: raring
+        #   - 13.10: saucy
         export DISTRO_ID="$(grep 'DISTRIB_ID' /etc/lsb-release | awk -F'=' '{print $2}')"
         export DISTRO_VERSION="$(grep 'DISTRIB_RELEASE' /etc/lsb-release | awk -F'=' '{print $2}')"
         export DISTRO_CODENAME="$(grep 'DISTRIB_CODENAME' /etc/lsb-release | awk -F'=' '{print $2}')"

iRedMail/functions/apache_php.sh

         perl -pi -e 's#^(LogLevel).*#${1} warn#' ${HTTPD_CONF}
 
         if [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
-            perl -pi -e 's#^(ServerTokens).*#${1} ProductOnly#' ${HTTPD_CONF_DIR}/security
+            perl -pi -e 's#^(ServerTokens).*#${1} ProductOnly#' ${HTTPD_MOD_CONF_SECURITY}
         fi
     fi
 

iRedMail/functions/roundcubemail.sh

 </Directory>
 EOF
 
+    # Enable this config file on Ubuntu 13.10 and later releases.
+    if [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ]; then
+        if [ X"${DISTRO_CODENAME}" == X'wheezy' \
+            -o X"${DISTRO_CODENAME}" == X'precise' \
+            -o X"${DISTRO_CODENAME}" == X'raring' ]; then
+            :
+        else
+            # Enable conf file: conf-available/roundcubemail.conf
+            a2enconf roundcubemail
+        fi
+    fi
+
     # Make Roundcube can be accessed via HTTPS.
     perl -pi -e 's#^(</VirtualHost>)#Alias /mail "$ENV{RCM_HTTPD_ROOT_SYMBOL_LINK}/"\n${1}#' ${HTTPD_SSL_CONF}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.