From 131917a891ba26bb9aec687fc5e5333bb0d441de Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 7 Dec 2022 00:14:22 +0100 Subject: [PATCH] hostname & https --- G1BILLETS.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/G1BILLETS.sh b/G1BILLETS.sh index 62ee320..7195f39 100755 --- a/G1BILLETS.sh +++ b/G1BILLETS.sh @@ -108,7 +108,13 @@ else ##################################################################### myIP=$(hostname -I | awk '{print $1}' | head -n 1) isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") -[[ $isLAN ]] && HNAME="http://g1billet.localhost" || HNAME="http://$(hostname)" +if [[ $isLAN ]]; then + HNAME="http://g1billet.localhost" + RNAME="$HNAME:33102" +else + HNAME="http://$(hostname)" + RNAME="https://$(hostname)/33102" +fi HTTPWELLCOME='HTTP/1.1 200 OK Access-Control-Allow-Origin: * @@ -120,13 +126,13 @@ Content-Type: text/html; charset=UTF-8 [G1BILLET] HTTP MICRO SERVICE - 33101 - 33102 - - + -

(♥‿‿♥).

+

(♥‿‿♥).