From ca312a6ace43a6fde58d1c09057c7b0bd34f15a2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 27 Nov 2019 17:25:46 +0100 Subject: [statistics/rebootcontrol] Implement editing subnet --- modules-available/rebootcontrol/inc/rebootcontrol.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules-available/rebootcontrol/inc/rebootcontrol.inc.php') 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) -- cgit v1.2.3-55-g7522