Bug 26265: (QA follow-up) Remove g option from regex, add few dirs
[koha-equinox.git] / debian / koha-common.config
index 3f97df9..87defe2 100755 (executable)
@@ -42,5 +42,21 @@ fi
 
 db_input medium koha-common/automatically-update-translations || true
 
+# Determine if we should ask the user about upgrading - there's no point
+# if this is a fresh install anyway.
+if [ -e /usr/sbin/koha-list ]; then
+    RENAME_APACHE_FILES="no"
+    for vhost in $(koha-list); do
+        if [ -f "/etc/apache2/sites-available/$vhost" ] && \
+           [ ! -f "/etc/apache2/sites-available/$vhost.conf" ]; then
+           RENAME_APACHE_FILES="yes"
+           break # at least one, trigger renaming
+        fi
+    done
+    if [ "$RENAME_APACHE_FILES" = "yes" ]; then
+        db_input high koha-common/rename-apache-vhost-files || true
+    fi
+fi
+
 db_go || true