From db81607370021925df8fec73539fa4f2c87276b1 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 16 Jan 2023 12:42:21 -0500 Subject: [PATCH] machine: use direct systemctl commands for reboot/shutdown Signed-off-by: Eric Callahan --- moonraker/components/machine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/components/machine.py b/moonraker/components/machine.py index eb63c0d..a714a6d 100644 --- a/moonraker/components/machine.py +++ b/moonraker/components/machine.py @@ -780,10 +780,10 @@ class BaseProvider: return await machine.exec_sudo_command(command) async def shutdown(self) -> None: - await self._exec_sudo_command(f"shutdown now") + await self._exec_sudo_command("systemctl halt") async def reboot(self) -> None: - await self._exec_sudo_command(f"shutdown -r now") + await self._exec_sudo_command("systemctl reboot") async def do_service_action(self, action: str,