summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-24 14:10:02 +0200
committerSimon Rettberg2022-05-24 14:10:02 +0200
commitd2e78b1370be829feb75a4bc6cf7f5755f1f7825 (patch)
tree7ba9f4ba02cc746b6f219804b5cc33ba976bfe4f /modules-available/rebootcontrol
parent[locationinfo] Add types (diff)
downloadslx-admin-d2e78b1370be829feb75a4bc6cf7f5755f1f7825.tar.gz
slx-admin-d2e78b1370be829feb75a4bc6cf7f5755f1f7825.tar.xz
slx-admin-d2e78b1370be829feb75a4bc6cf7f5755f1f7825.zip
[rebootcontrol] Change WakeOnLan task call struct to new format
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r--modules-available/rebootcontrol/inc/rebootcontrol.inc.php16
1 files changed, 10 insertions, 6 deletions
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]);
}
/**