add: variable triggered function to disable octoprint service

This commit is contained in:
th33xitus
2020-08-22 17:48:52 +02:00
parent eb6b2465c7
commit 2be2ce12c6

View File

@@ -246,6 +246,12 @@ enable_octoprint_service(){
fi
}
disable_octoprint(){
if [ "$DISABLE_OPRINT" = "true" ]; then
disable_octoprint_service
fi
}
disable_octoprint_service(){
if [[ -f $OCTOPRINT_SERVICE1 && -f $OCTOPRINT_SERVICE2 ]]; then
status_msg "OctoPrint Service is enabled! Disabling now ..."
@@ -278,6 +284,7 @@ read_octoprint_service_status(){
}
create_reverse_proxy(){
if [ "$SET_REVERSE_PROXY" = "true" ]; then
#check for dependencies
dep=(nginx)
dependency_check
@@ -299,6 +306,7 @@ create_reverse_proxy(){
sudo ln -s /etc/nginx/sites-available/$1 /etc/nginx/sites-enabled/
fi
restart_nginx
fi
}
create_custom_hostname(){
@@ -308,7 +316,7 @@ create_custom_hostname(){
echo -e "| that name to open the Interface in your browser. |"
echo -e "| |"
echo -e "| Example: If you set the hostname to 'my-printer' |"
echo -e "| you can open Mainsail/Octoprint by |"
echo -e "| you can open DWC2/Mainsail/Octoprint by |"
echo -e "| browsing to: http://my-printer.local |"
bottom_border
while true; do