fix: enable mainsail remoteMode if its already installed before moonraker

This commit is contained in:
th33xitus
2021-01-30 18:19:49 +01:00
parent 82227f8d0b
commit dc6fea8c3b
2 changed files with 11 additions and 3 deletions

View File

@@ -243,15 +243,19 @@ mainsail_setup(){
status_msg "Remove downloaded archive ..." status_msg "Remove downloaded archive ..."
rm -rf *.zip && ok_msg "Done!" rm -rf *.zip && ok_msg "Done!"
### check for moonraker multi-instance and if multi-instance was found, activate mainsail remoteMode ### check for moonraker multi-instance and if multi-instance was found, enable mainsails remoteMode
if [ $(ls /etc/systemd/system/moonraker* | wc -l) -gt 1 ]; then if [ $(ls /etc/systemd/system/moonraker* | wc -l) -gt 1 ]; then
rm -f $MAINSAIL_DIR/config.json enable_mainsail_remotemode
echo -e "{\n \"remoteMode\":true\n}" >> $MAINSAIL_DIR/config.json
fi fi
ok_msg "Mainsail installation complete!\n" ok_msg "Mainsail installation complete!\n"
} }
enable_mainsail_remotemode(){
rm -f $MAINSAIL_DIR/config.json
echo -e "{\n \"remoteMode\":true\n}" >> $MAINSAIL_DIR/config.json
}
fluidd_setup(){ fluidd_setup(){
### get fluidd download url ### get fluidd download url
FLUIDD_DL_URL=$(curl -s https://api.github.com/repositories/295836951/releases/latest | grep browser_download_url | cut -d'"' -f4) FLUIDD_DL_URL=$(curl -s https://api.github.com/repositories/295836951/releases/latest | grep browser_download_url | cut -d'"' -f4)

View File

@@ -139,6 +139,10 @@ moonraker_setup(){
create_single_moonraker_instance create_single_moonraker_instance
else else
create_multi_moonraker_instance create_multi_moonraker_instance
### step 6.5: enable mainsails remoteMode if its already installed
if [ -d $MAINSAIL_DIR ]; then
enable_mainsail_remotemode
fi
fi fi
} }