CC-5781: Upgrade script for new storage quota implementation

Was using du wrong. Wasn't returning value in bytes
This commit is contained in:
drigato 2014-04-17 13:53:24 -04:00
parent 3ebf9e56dd
commit c8121f9bc8
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ 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\"");
$storDir = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."srv/airtime/stor" : "/srv/airtime/stor";
$diskUsage = shell_exec("du -s $storDir | awk '{print $1}'");
$diskUsage = shell_exec("du -sb $storDir | awk '{print $1}'");
Application_Model_Preference::setDiskUsage($diskUsage);