From 374d984cedc0e34ddbd7e84ea9b756967582773c Mon Sep 17 00:00:00 2001 From: th33xitus Date: Mon, 26 Oct 2020 19:22:20 +0100 Subject: [PATCH] fix: make installer not fail if klipper is installed as systemd service If Klipper is installed as systemd service, the script would fail and exit at step 6 (corrected that typo) when trying to stop Klipper via init.d. Changing the used command to systemctl will be compatible with both init.d and systemd services. Signed-off-by: Dominik Willner --- scripts/install-moonraker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install-moonraker.sh b/scripts/install-moonraker.sh index 545133e..ad3a623 100755 --- a/scripts/install-moonraker.sh +++ b/scripts/install-moonraker.sh @@ -69,13 +69,13 @@ MOONRAKER_ARGS="${SRCDIR}/moonraker/moonraker.py" EOF } -# Step 4: Start server +# Step 6: Start server start_software() { report_status "Launching Moonraker API Server..." - sudo /etc/init.d/klipper stop + sudo systemctl stop klipper sudo /etc/init.d/moonraker restart - sudo /etc/init.d/klipper start + sudo systemctl start klipper } # Helper functions