CC-2935: Upgrade: delete virtualenv dir and reinstall virtualenv

- done
This commit is contained in:
James 2011-10-06 16:22:00 -04:00
parent efe366ad60
commit cd72931a73
1 changed files with 8 additions and 1 deletions

View File

@ -62,7 +62,14 @@ if (isset($version) && ($version != false) && ($version == AIRTIME_VERSION) && !
// A previous version exists - if so, upgrade.
if (isset($version) && ($version != false) && ($version < AIRTIME_VERSION) && !isset($opts->r)) {
echo "Airtime version $version found.".PHP_EOL;
// remove virtualenv and reinstall
if(strcmp($version, '1.9.0') >= 0){
exec("rm -rf /usr/lib/airtime/airtime_virtualenv");
echo "Reinstalling virtualenv...".PHP_EOL;
passthru(__DIR__."/../../python_apps/python-virtualenv/virtualenv-install.sh");
}
require_once("airtime-upgrade.php");
exit(0);
}