mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 02:24:27 +05:00
Fix OctoPrint toggle function
This commit is contained in:
@@ -229,14 +229,18 @@ disable_octoprint_service(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggle_octoprint_service(){
|
toggle_octoprint_service(){
|
||||||
if systemctl is-enabled octoprint.service -q; then
|
if [[ -f $OCTOPRINT_SERVICE1 && -f $OCTOPRINT_SERVICE2 ]]; then
|
||||||
disable_octoprint_service
|
if systemctl is-enabled octoprint.service -q; then
|
||||||
sleep 2
|
disable_octoprint_service
|
||||||
CONFIRM_MSG=" OctoPrint Service is now >>> DISABLED <<< !"
|
sleep 2
|
||||||
|
CONFIRM_MSG=" OctoPrint Service is now >>> DISABLED <<< !"
|
||||||
|
else
|
||||||
|
enable_octoprint_service
|
||||||
|
sleep 2
|
||||||
|
CONFIRM_MSG=" OctoPrint Service is now >>> ENABLED <<< !"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
enable_octoprint_service
|
ERROR_MSG=" You cannot activate a service that does not exist!"
|
||||||
sleep 2
|
|
||||||
CONFIRM_MSG=" OctoPrint Service is now >>> ENABLED <<< !"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user