Fix to upgrade path

This commit is contained in:
Duncan Sommerville 2015-03-25 12:03:01 -04:00
parent 0a3d8ea515
commit 47f7ad2e98
4 changed files with 12 additions and 7 deletions

View file

@ -386,8 +386,10 @@ if [ "$apache" = "t" ]; then
if [ "$apacheversion" != "1" ]; then
airtimeconfigfile="airtime.conf"
oldconfigfile="airtime-vhost.conf"
else
airtimeconfigfile="airtime"
oldconfigfile="airtime-vhost"
fi
# If we're upgrading (installing over an existing Airtime install) and we've been told to
@ -403,6 +405,11 @@ if [ "$apache" = "t" ]; then
sed -e "s@WEB_ROOT@${web_root}@g" ${SCRIPT_DIR}/installer/apache/airtime-vhost > /etc/apache2/sites-available/${airtimeconfigfile}
fi
loudCmd "a2dissite 000-default"
# If Airtime was previously installed with apt, the vhost file name is different,
# so we need to specifically disable it.
if [ -f "/etc/apache2/sites-available/${oldconfigfile}" ]; then
loudCmd "a2dissite airtime-vhost"
fi
loudCmd "a2ensite airtime"
else
verbose "\nApache config for Airtime already exists, skipping"