From b0053328400884fd4d0ef3b39e81c570c82760df Mon Sep 17 00:00:00 2001 From: JeLuF Date: Tue, 11 Jul 2023 23:03:11 +0200 Subject: [PATCH 1/2] Add Bind IP option --- scripts/on_sd_start.bat | 5 ++++- scripts/on_sd_start.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 3a8a2961..9e2914a5 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -104,12 +104,15 @@ call python --version @FOR /F "tokens=* USEBACKQ" %%F IN (`python scripts\get_config.py --default=False net listen_to_network`) DO ( if "%%F" EQU "True" ( - @SET ED_BIND_IP=0.0.0.0 + @FOR /F "tokens=* USEBACKQ" %%G IN (`python scripts\get_config.py --default=0.0.0.0 net bind_ip`) DO ( + @SET ED_BIND_IP=%%G + ) ) else ( @SET ED_BIND_IP=127.0.0.1 ) ) + @cd stable-diffusion @rem set any overrides diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index e54c72bc..858d5d2b 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -72,7 +72,7 @@ export SD_UI_PATH=`pwd`/ui export ED_BIND_PORT="$( python scripts/get_config.py --default=9000 net listen_port )" case "$( python scripts/get_config.py --default=False net listen_to_network )" in "True") - export ED_BIND_IP=0.0.0.0 + export ED_BIND_IP=$( python scripts/get_config.py --default=0.0.0.0) net bind_ip) ;; "False") export ED_BIND_IP=127.0.0.1 From 4b89c3e7a5998d7cf21510d0fa991e9506ea190b Mon Sep 17 00:00:00 2001 From: JeLuF Date: Thu, 13 Jul 2023 10:14:46 +0200 Subject: [PATCH 2/2] fix typo --- scripts/on_sd_start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 858d5d2b..e366bd2a 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -72,7 +72,7 @@ export SD_UI_PATH=`pwd`/ui export ED_BIND_PORT="$( python scripts/get_config.py --default=9000 net listen_port )" case "$( python scripts/get_config.py --default=False net listen_to_network )" in "True") - export ED_BIND_IP=$( python scripts/get_config.py --default=0.0.0.0) net bind_ip) + export ED_BIND_IP=$( python scripts/get_config.py --default=0.0.0.0 net bind_ip) ;; "False") export ED_BIND_IP=127.0.0.1