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:
parent
54e8141a3c
commit
4e28ee629a
install
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue