use config-value for reboottime
This commit is contained in:
parent
64e15566dd
commit
e14a5fbcd7
|
@ -111,11 +111,11 @@ if(file_exists("cache/reboot.trigger")) {
|
||||||
unlink("cache/reboot.trigger");
|
unlink("cache/reboot.trigger");
|
||||||
$rebootser = serialize($rebootjobs);
|
$rebootser = serialize($rebootjobs);
|
||||||
file_put_contents("cache/get-services.trigger", $rebootser);
|
file_put_contents("cache/get-services.trigger", $rebootser);
|
||||||
file_put_contents("cache/reboot-time.trigger", time() + (5 * 60));
|
file_put_contents("cache/reboot-time.trigger", time() + (get_configvalue('jobs.reboottime') * 60));
|
||||||
$rebooted_hosts = array();
|
$rebooted_hosts = array();
|
||||||
foreach($rebootjobs as $job) {
|
foreach($rebootjobs as $job) {
|
||||||
|
|
||||||
$url = "ssh " . $job['host'] . " '" . 'sudo shutdown -r +5 "A reboot has been scheduled. Please save your work."' . "'";
|
$url = "ssh " . $job['host'] . " '" . 'sudo shutdown -r +' . get_configvalue('jobs.reboottime') . ' "A reboot has been scheduled. Please save your work."' . "'";
|
||||||
exec($url);
|
exec($url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue