From d3283f7ab725a22d41dde77e841910a088690f9a Mon Sep 17 00:00:00 2001 From: th33xitus Date: Fri, 19 Feb 2021 11:05:43 +0100 Subject: [PATCH] fix: try to fix a bug where the script errors out, telling that there is already a moonraker service installed but actually there isn't --- scripts/install_moonraker.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_moonraker.sh b/scripts/install_moonraker.sh index 7119d6c..29f66dd 100755 --- a/scripts/install_moonraker.sh +++ b/scripts/install_moonraker.sh @@ -46,12 +46,12 @@ moonraker_setup_dialog(){ fi ### check for existing moonraker service installations - if [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "moonraker.service")" ] || [ "$(systemctl list-units --full -all -t service --no-legend | grep -E "moonraker-[[:digit:]].service")" ]; then + if ls /etc/systemd/system/moonraker*.service 2>/dev/null 1>&2; then ERROR_MSG="At least one Moonraker service is already installed!" && return 0 fi ### check for existing klipper service installations - if [ ! "$(systemctl list-units --full -all -t service --no-legend | grep -F "klipper.service")" ] && [ ! "$(systemctl list-units --full -all -t service --no-legend | grep -E "klipper-[[:digit:]].service")" ]; then + if ! ls /etc/systemd/system/klipper*.service 2>/dev/null 1>&2; then ERROR_MSG="Klipper service not found, please install Klipper first!" && return 0 fi