Skip to content

Commit

Permalink
Fix to upgrade path
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsommer committed Mar 25, 2015
1 parent 0a3d8ea commit 47f7ad2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions airtime_mvc/application/controllers/UpgradeController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

require_once("Upgrades.php");

class UpgradeController extends Zend_Controller_Action
{
public function indexAction()
Expand Down
2 changes: 1 addition & 1 deletion airtime_mvc/application/upgrade/Upgrades.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static function doUpgrade()
array_push($upgraders, new AirtimeUpgrader253());
array_push($upgraders, new AirtimeUpgrader254());
*/
return $upgradeManager->runUpgrades(array(new AirtimeUpgrader252()), (__DIR__ . "/controllers"));
return $upgradeManager->runUpgrades(array(new AirtimeUpgrader252()), (dirname(__DIR__) . "/controllers"));
}

/**
Expand Down
7 changes: 7 additions & 0 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ echo "pip airtime-media-monitor"
echo -e "\nIf your web root is not listed, you will need to manually remove it."
echo -e "\nThis will *permanently* remove Airtime and all related files from your computer. \
Any files in Airtime directories and subdirectories will be deleted. Are you sure you want to proceed? (Y/n): \c"
Any files in Airtime directories and subdirectories will be deleted. Are you sure you want to proceed? [y/N]: \c"
read IN
if [[ ! ( "$IN" = "y" || "$IN" = "Y" ) ]]; then
exit 0
fi
if [ -n "${STOR_DIR}" ]; then
echo -e "\nAre you sure you want to remove your music storage directory ${STOR_DIR} and all of its subdirectories? (Y/n): \c"
echo -e "\nDo you want to remove your music storage directory ${STOR_DIR} and all of its subdirectories? [y/N]: \c"
read IN
if [[ "$IN" = "y" || "$IN" = "Y" ]]; then
if [[ ( "$IN" = "y" || "$IN" = "Y" ) ]]; then
rm -rf ${STOR_DIR}
fi
else
Expand All @@ -94,7 +94,7 @@ for i in ${FILES[*]}; do
rm -rf $i
done
echo -e "\nDo you want to drop your current Airtime database? (Y/n): \c"
echo -e "\nDo you want to drop your current Airtime database? [y/N]: \c"
read IN
if [[ "$IN" = "y" || "$IN" = "Y" ]]; then
echo -e "\nDropping Airtime database..."
Expand Down

0 comments on commit 47f7ad2

Please sign in to comment.