Upgrade action testing
This commit is contained in:
parent
cd6c4f7ede
commit
456ac40fe6
|
@ -13,9 +13,9 @@ class UpgradeController extends Zend_Controller_Action
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->verifyAirtimeVersion()) {
|
/*if (!$this->verifyAirtimeVersion()) {
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//Begin upgrade
|
//Begin upgrade
|
||||||
$filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
|
$filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
|
||||||
|
@ -29,16 +29,10 @@ class UpgradeController extends Zend_Controller_Action
|
||||||
|
|
||||||
passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/upgrade_sql/airtime_$airtime_upgrade_version/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\"");
|
passthru("export PGPASSWORD=$password && psql -h $host -U $username -q -f $dir/upgrade_sql/airtime_$airtime_upgrade_version/upgrade.sql $database 2>&1 | grep -v \"will create implicit index\"");
|
||||||
|
|
||||||
$musicDir = CcMusicDirsQuery::create()
|
$storDir = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."srv/airtime/stor" : "/srv/airtime/stor";
|
||||||
->filterByType('stor')
|
$diskUsage = shell_exec("du -s $storDir | awk '{print $1}'");
|
||||||
->filterByExists(true)
|
|
||||||
->findOne();
|
|
||||||
$storPath = $musicDir->getDirectory();
|
|
||||||
|
|
||||||
$freeSpace = disk_free_space($storPath);
|
Application_Model_Preference::setDiskUsage($diskUsage);
|
||||||
$totalSpace = disk_total_space($storPath);
|
|
||||||
|
|
||||||
Application_Model_Preference::setDiskUsage($totalSpace - $freeSpace);
|
|
||||||
|
|
||||||
$this->getResponse()
|
$this->getResponse()
|
||||||
->setHttpResponseCode(200)
|
->setHttpResponseCode(200)
|
||||||
|
|
Loading…
Reference in New Issue