Add reboot command handling in processCommand function
This commit is contained in:
@@ -176,6 +176,12 @@ local function processCommand(cmd)
|
|||||||
commandId = cmd.commandId,
|
commandId = cmd.commandId,
|
||||||
recipeIdx = cmd.recipeIdx,
|
recipeIdx = cmd.recipeIdx,
|
||||||
})
|
})
|
||||||
|
elseif action == "reboot" then
|
||||||
|
modem.transmit(ORDER_CHANNEL, BROADCAST_CHANNEL, {
|
||||||
|
type = "reboot",
|
||||||
|
commandId = cmd.commandId,
|
||||||
|
target = cmd.target or "all",
|
||||||
|
})
|
||||||
else
|
else
|
||||||
print("[CMD] Unknown action: " .. tostring(action))
|
print("[CMD] Unknown action: " .. tostring(action))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user