From d2e78b1370be829feb75a4bc6cf7f5755f1f7825 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 May 2022 14:10:02 +0200 Subject: [rebootcontrol] Change WakeOnLan task call struct to new format --- .../rebootcontrol/inc/rebootcontrol.inc.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'modules-available/rebootcontrol') diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php index cc65e82d..c0ff3a43 100644 --- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php +++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php @@ -265,12 +265,16 @@ class RebootControl if ($port < 1 || $port > 65535) { $port = 9; } - return Taskmanager::submit('WakeOnLan', [ - 'ip' => $bcast, - 'password' => $passwd === false ? '' : $passwd, - 'macs' => $macaddr, - 'port' => $port, - ]); + $arg = []; + foreach ($macaddr as $mac) { + $arg[] = [ + 'ip' => $bcast, + 'mac' => $mac, + 'methods' => ['DIRECT'], + 'password' => $passwd, + ]; + } + return Taskmanager::submit('WakeOnLan', ['clients' => $arg]); } /** -- cgit v1.2.3-55-g7522