View | Details | Raw Unified | Return to bug 11404
Collapse All | Expand All

(-)a/debian/koha-common.config (-1 / +15 lines)
Lines 42-48 fi Link Here
42
42
43
db_input medium koha-common/automatically-update-translations || true
43
db_input medium koha-common/automatically-update-translations || true
44
44
45
db_input high koha-common/rename-apache-vhost-files || true
45
# Determine if we should ask the user about upgrading - there's no point
46
# if this is a fresh install anyway.
47
if [ -e /usr/sbin/koha-list ]; then
48
    RENAME_APACHE_FILES="no"
49
    for vhost in $(koha-list); do
50
        if [ -f "/etc/apache2/sites-available/$vhost" ] && \
51
           [ ! -f "/etc/apache2/sites-available/$vhost.conf" ]; then
52
           RENAME_APACHE_FILES="yes"
53
           break # at least one, trigger renaming
54
        fi
55
    done
56
    if [ "$RENAME_APACHE_FILES" = "yes" ]; then
57
        db_input high koha-common/rename-apache-vhost-files || true
58
    fi
59
fi
46
60
47
db_go || true
61
db_go || true
48
62
(-)a/debian/koha-common.postinst (-3 / +3 lines)
Lines 109-118 EOF Link Here
109
            ENABLE_VHOST="yes"
109
            ENABLE_VHOST="yes"
110
            if [ -f "/etc/apache2/sites-available/$site" ] && \
110
            if [ -f "/etc/apache2/sites-available/$site" ] && \
111
               [ ! -f "/etc/apache2/sites-available/$site.conf" ]; then
111
               [ ! -f "/etc/apache2/sites-available/$site.conf" ]; then
112
                if ! a2dissite $site > /dev/null 2>&1; then
112
                if [ ! -f "/etc/apache2/sites-enabled/$site" ]; then
113
                    echo "Warning: problem disabling $site in Apache" >&2
114
                    ENABLE_VHOST="no"
113
                    ENABLE_VHOST="no"
115
                fi
114
                fi
115
                a2dissite $site > /dev/null 2>&1 || true
116
                rm -f "/etc/apache2/sites-enabled/$site"
116
                # Rename the vhost definition files
117
                # Rename the vhost definition files
117
                mv "/etc/apache2/sites-available/$site" \
118
                mv "/etc/apache2/sites-available/$site" \
118
                   "/etc/apache2/sites-available/$site.conf"
119
                   "/etc/apache2/sites-available/$site.conf"
119
- 

Return to bug 11404