feat: KIAUH v4.0.0 #191

Merged
dw-0 merged 453 commits from v4-rc into master 2022-05-29 20:11:16 +02:00
2 changed files with 19 additions and 0 deletions
Showing only changes of commit 8004f11150 - Show all commits

View File

@@ -176,6 +176,11 @@ function download_mainsail() {
print_error "Downloading Mainsail from\n ${url}\n failed!"
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
enable_mainsail_remotemode
fi
}
#===================================================#
@@ -539,6 +544,13 @@ function select_mainsail_port() {
fi
}
function enable_mainsail_remotemode() {
[[ ! -f "${MAINSAIL_DIR}/config.json" ]] && return
rm -f "${MAINSAIL_DIR}/config.json"
echo -e "{\n \"remoteMode\":true\n}" >> "${MAINSAIL_DIR}/config.json"
}
function patch_mainsail_update_manager() {
local moonraker_configs
moonraker_configs=$(find "${KLIPPER_CONFIG}" -type f -name "moonraker.conf" | sort)

View File

@@ -322,6 +322,13 @@ function create_moonraker_service() {
j=$(( j + 1 ))
done && unset i
### enable mainsails remoteMode if mainsail is found
if [[ -d ${MAINSAIL_DIR} ]]; then
status_msg "Mainsail installation found! Enabling Mainsail remote mode ..."
enable_mainsail_remotemode
ok_msg "Mainsails remote mode enabled!"
fi
else
return 1
fi