enable to install mainsail/fluidd without moonraker

This allows the user to install
remote mode Mainsail / Fluidd without Moonraker installed
in order to setup separated web server from klipper host.
This commit is contained in:
Mitsunori YOSHIDA
2023-06-04 00:45:47 +00:00
parent 8228943850
commit 7e7043ad48
2 changed files with 34 additions and 4 deletions

View File

@@ -19,7 +19,21 @@ function install_fluidd() {
### exit early if moonraker not found
if [[ -z $(moonraker_systemd) ]]; then
local error="Moonraker not installed! Please install Moonraker first!"
print_error "${error}" && return
print_error "${error}"
while true; do
read -p "${cyan}###### Install Fluidd without Moonraker? (y/N):${white} " yn
case "${yn}" in
Y|y|Yes|yes)
select_msg "Yes"
break;;
N|n|No|no|"")
select_msg "No"
abort_msg "Exiting Fluidd setup ...\n"
return;;
*)
error_msg "Invalid Input!";;
esac
done
fi
### checking dependencies

View File

@@ -19,7 +19,21 @@ function install_mainsail() {
### exit early if moonraker not found
if [[ -z $(moonraker_systemd) ]]; then
local error="Moonraker not installed! Please install Moonraker first!"
print_error "${error}" && return
print_error "${error}"
while true; do
read -p "${cyan}###### Install remote-mode Mainsail without Moonraker? (y/N):${white} " yn
case "${yn}" in
Y|y|Yes|yes)
select_msg "Yes"
break;;
N|n|No|no|"")
select_msg "No"
abort_msg "Exiting Mainsail setup ...\n"
return;;
*)
error_msg "Invalid Input!";;
esac
done
fi
### checking dependencies
@@ -157,6 +171,7 @@ function download_mainsail_macros() {
}
function download_mainsail() {
local services
local url
url=$(get_mainsail_download_url)
@@ -179,8 +194,9 @@ function download_mainsail() {
exit 1
fi
### check for moonraker multi-instance and if multi-instance was found, enable mainsails remoteMode
if [[ $(moonraker_systemd | wc -w) -gt 1 ]]; then
### check for moonraker multi-instance and if no-instance or multi-instance was found, enable mainsails remoteMode
services=$(moonraker_systemd)
if [[ ( -z "$services" ) || ( $(echo "${services}" | wc -w) -gt 1 ) ]]; then
enable_mainsail_remotemode
fi
}