refactor: revert 37586b4

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-05-28 15:38:25 +02:00
parent 104c38a83d
commit 8004f11150
2 changed files with 19 additions and 0 deletions

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)