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
|
@ -404,4 +404,14 @@ class AirtimeInstall
|
||||||
|
|
||||||
exec("rm -rf \"$path\"");
|
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();
|
AirtimeInstall::CreateZendPhpLogFile();
|
||||||
|
|
||||||
// Create CRON task to run every day. Time of day is initialized to a random time.
|
AirtimeInstall::CreateCronFile();
|
||||||
$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);
|
|
||||||
|
|
||||||
/* FINISHED AIRTIME PHP INSTALLER */
|
/* FINISHED AIRTIME PHP INSTALLER */
|
||||||
|
|
|
@ -124,6 +124,9 @@ CopyUtils();
|
||||||
removeOldAirtimeImport();
|
removeOldAirtimeImport();
|
||||||
updateAirtimeImportSymLink();
|
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
|
//need to change database because old format had full path while new database has partial paths
|
||||||
//also need to add new column
|
//also need to add new column
|
||||||
|
|
Loading…
Reference in New Issue