diff options
author | Simon Rettberg | 2019-11-27 17:25:46 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-11-27 17:25:46 +0100 |
commit | ca312a6ace43a6fde58d1c09057c7b0bd34f15a2 (patch) | |
tree | 3cb4e5ac2b29f7fcc99dfda5df26f11a64caeaf3 /modules-available/rebootcontrol/inc/rebootcontrol.inc.php | |
parent | [js_ip/locations] Mode cidr/ip handling to own module (diff) | |
download | slx-admin-ca312a6ace43a6fde58d1c09057c7b0bd34f15a2.tar.gz slx-admin-ca312a6ace43a6fde58d1c09057c7b0bd34f15a2.tar.xz slx-admin-ca312a6ace43a6fde58d1c09057c7b0bd34f15a2.zip |
[statistics/rebootcontrol] Implement editing subnet
Diffstat (limited to 'modules-available/rebootcontrol/inc/rebootcontrol.inc.php')
-rw-r--r-- | modules-available/rebootcontrol/inc/rebootcontrol.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php index 680f9eff..8a85e3ff 100644 --- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php +++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php @@ -123,13 +123,17 @@ class RebootControl if ($privkey === false) { $privkey = SSHKey::getPrivateKey(); } - return Taskmanager::submit('RemoteExec', [ + $task = Taskmanager::submit('RemoteExec', [ 'clients' => $valid, 'command' => $command, 'timeoutSeconds' => $timeout, 'sshkey' => $privkey, 'port' => 9922, // Fallback if no port given in client struct ]); + if (!Taskmanager::isFailed($task)) { + Property::addToList(RebootControl::KEY_TASKLIST, '0/' . $task["id"], 60 * 24); + } + return $task; } public static function connectionCheckCallback($task, $hostId) |