mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
fix: make remove function now also remove disabled octoprint services
This commit is contained in:
@@ -279,7 +279,7 @@ remove_fluidd(){
|
|||||||
|
|
||||||
remove_octoprint(){
|
remove_octoprint(){
|
||||||
###remove single instance
|
###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 ..."
|
status_msg "Removing OctoPrint Service ..."
|
||||||
sudo systemctl stop octoprint
|
sudo systemctl stop octoprint
|
||||||
sudo systemctl disable octoprint
|
sudo systemctl disable octoprint
|
||||||
@@ -288,7 +288,7 @@ remove_octoprint(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
###remove multi instance services
|
###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 ..."
|
status_msg "Removing OctoPrint Services ..."
|
||||||
for service in $(find $SYSTEMDDIR -maxdepth 1 -name "octoprint-*.service" | cut -d"/" -f5)
|
for service in $(find $SYSTEMDDIR -maxdepth 1 -name "octoprint-*.service" | cut -d"/" -f5)
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user