From 7dc1bc6cc8f945ed1b8a607af19ad87271f8e6a0 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Fri, 8 Jan 2021 20:02:58 +0100 Subject: [PATCH] fix: add full range of local network to auto-created moonraker.conf files --- scripts/install_moonraker.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install_moonraker.sh b/scripts/install_moonraker.sh index 32ccdaf..e663fed 100755 --- a/scripts/install_moonraker.sh +++ b/scripts/install_moonraker.sh @@ -240,6 +240,7 @@ moonraker_conf_creation(){ create_single_moonraker_conf(){ HOSTNAME=$(hostname -I | cut -d" " -f1) + LOCAL_NETWORK="$(hostname -I | cut -d" " -f1 | cut -d"." -f1-3).0/24" /bin/sh -c "cat > $MOONRAKER_CONF_LOC/moonraker.conf" << MOONRAKERCONF [server] @@ -254,6 +255,7 @@ enabled: True api_key_file: ~/.moonraker_api_key trusted_clients: 127.0.0.1 + $LOCAL_NETWORK cors_domains: http://*.local http://app.fluidd.xyz @@ -268,6 +270,7 @@ MOONRAKERCONF create_multi_moonraker_conf(){ HOSTNAME=$(hostname -I | cut -d" " -f1) + NETWORK="$(hostname -I | cut -d" " -f1 | cut -d"." -f1-3).0/24" /bin/sh -c "cat > $MOONRAKER_CONF_LOC/moonraker-$INSTANCE.conf" << MOONRAKERCONF [server] @@ -282,7 +285,7 @@ enabled: True api_key_file: ~/.moonraker_api_key trusted_clients: 127.0.0.1 - $HOSTNAME + $LOCAL_NETWORK cors_domains: http://*.local http://app.fluidd.xyz