CC-2535:Need to add creating cron file part in upgrade script

- factor the part into the function
(AirtimeInstall:CreateCronFile())

- fixed 1.9 upgrade script
This commit is contained in:
james 2011-07-13 08:27:35 -04:00
parent 54e8141a3c
commit 4e28ee629a
3 changed files with 14 additions and 7 deletions

View File

@ -404,4 +404,14 @@ class AirtimeInstall
exec("rm -rf \"$path\"");
}
public static function CreateCronFile(){
// Create CRON task to run every day. Time of day is initialized to a random time.
$hour = rand(0,23);
$minute = rand(0,59);
$fp = fopen('/etc/cron.d/airtime-crons','w');
fwrite($fp, "$minute $hour * * * root /usr/lib/airtime/utils/phone_home_stat\n");
fclose($fp);
}
}

View File

@ -147,12 +147,6 @@ AirtimeInstall::CreateSymlinksToUtils();
AirtimeInstall::CreateZendPhpLogFile();
// Create CRON task to run every day. Time of day is initialized to a random time.
$hour = rand(0,23);
$minute = rand(0,59);
$fp = fopen('/etc/cron.d/airtime-crons','w');
fwrite($fp, "$minute $hour * * * root /usr/lib/airtime/utils/phone_home_stat\n");
fclose($fp);
AirtimeInstall::CreateCronFile();
/* FINISHED AIRTIME PHP INSTALLER */

View File

@ -124,6 +124,9 @@ CopyUtils();
removeOldAirtimeImport();
updateAirtimeImportSymLink();
//create cron file for phone home stat
AirtimeInstall::CreateCronFile();
//need to change database because old format had full path while new database has partial paths
//also need to add new column