feat: allow to install Mainsail/Fluidd without Moonraker (#347)

Co-authored-by: th33xitus <th33xitus@googlemail.com>
This commit is contained in:
marbocub
2023-06-07 04:09:47 +09:00
committed by GitHub
parent bcbb185bd7
commit 0cd058320f
2 changed files with 39 additions and 9 deletions

View File

@@ -16,10 +16,24 @@ set -e
#===================================================#
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
local error="Moonraker not installed! It's recommended to install Moonraker first!"
print_error "${error}"
while true; do
local yn
read -p "${cyan}###### Proceed to install Fluidd without installing 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
@@ -30,7 +44,7 @@ function install_fluidd() {
status_msg "Initializing Fluidd installation ..."
### first, we create a backup of the full klipper_config dir - safety first!
backup_klipper_config_dir
#backup_klipper_config_dir
### check for other enabled web interfaces
unset SET_LISTEN_PORT

View File

@@ -16,10 +16,24 @@ set -e
#===================================================#
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
local error="Moonraker not installed! It's recommended to install Moonraker first!"
print_error "${error}"
while true; do
local yn
read -p "${cyan}###### Proceed to install Mainsail without installing 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
}