From 2ef3273b7460951a671861720065538f3bb1c04d Mon Sep 17 00:00:00 2001 From: th33xitus Date: Fri, 29 Jan 2021 20:23:55 +0100 Subject: [PATCH] fix: make remove function now also remove disabled octoprint services --- scripts/remove.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/remove.sh b/scripts/remove.sh index ac5962f..7cb885c 100755 --- a/scripts/remove.sh +++ b/scripts/remove.sh @@ -279,7 +279,7 @@ remove_fluidd(){ remove_octoprint(){ ###remove single instance - if [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "octoprint.service")" ]; then + if [ "$(systemctl list-unit-files | grep -F "octoprint.service")" ]; then status_msg "Removing OctoPrint Service ..." sudo systemctl stop octoprint sudo systemctl disable octoprint @@ -288,7 +288,7 @@ remove_octoprint(){ fi ###remove multi instance services - if [ "$(systemctl list-units --full -all -t service --no-legend | grep -E "octoprint-[[:digit:]].service")" ]; then + if [ "$(systemctl list-unit-files | grep -E "octoprint-[[:digit:]].service")" ]; then status_msg "Removing OctoPrint Services ..." for service in $(find $SYSTEMDDIR -maxdepth 1 -name "octoprint-*.service" | cut -d"/" -f5) do