From 3ed48da61504c71455eddb613746f6769b7cf8fe Mon Sep 17 00:00:00 2001 From: paukstelis Date: Sat, 17 Apr 2021 12:17:51 -0400 Subject: [PATCH] Fix detecting existing service --- addnew_printer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addnew_printer.sh b/addnew_printer.sh index b363736..06c5095 100755 --- a/addnew_printer.sh +++ b/addnew_printer.sh @@ -207,7 +207,7 @@ then -e "s/NEWPORT/$PORT/" > /etc/systemd/system/$INSTANCE.service #If a default octoprint service exists, stop and disable it - if [ -d "/etc/systemd/system/octoprint_default.service" ]; then + if [ -f "/etc/systemd/system/octoprint_default.service" ]; then systemctl stop octoprint_default.service systemctl disable octoprint_default.service fi