From 85eb8221eebb68c7af0e104a1452d9b196261b43 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 28 Nov 2023 22:57:42 +0100 Subject: [PATCH] myASTROPORT isLAN? myIP addressing --- API/QRCODE.sh | 2 +- tools/my.sh | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index fa242013..162f5eb5 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -837,7 +837,7 @@ else if [[ $GCFOUND == "false" ]]; then echo "PAS DE COMPTE CESIUM POUR CETTE CLEF GCHANGE" sed "s~_TWLINK_~https://demo.cesium.app/#/app/wot/$QRCODE/~g" ${MY_PATH}/../templates/index.302 > ~/.zen/tmp/${MOATS}/index.redirect - echo "url='"${myASTRONEF}"'" >> ~/.zen/tmp/${MOATS}/index.redirect + echo "url='"${myASTROPORT}"'" >> ~/.zen/tmp/${MOATS}/index.redirect sed -i "s~Set-Cookie*~Set-Cookie: $COOKIE~" ~/.zen/tmp/${MOATS}/index.redirect ( cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1) & exit 0 diff --git a/tools/my.sh b/tools/my.sh index dd660a04..27e2ef0d 100755 --- a/tools/my.sh +++ b/tools/my.sh @@ -421,16 +421,15 @@ myIP="$(myIp)" # "127.0.0.1" 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])/") -myASTROPORT="http://astroport.localhost:1234" -myASTRONEF="http://astroport.localhost:1234" +myASTROPORT="http://${myIP}:1234" myAPI="http://${myIP}:5001" myDATA="https://data.gchange.fr" myGCHANGE="https://www.gchange.fr" myCESIUM="https://g1.data.e-is.pro" -myG1BILLET="http://g1billet.localhost:33101" +myG1BILLET="http://${myIP}:33101" myHOST="$(myHostName)" -myIPFS="http://ipfs.localhost:8080" +myIPFS="http://${myIP}:8080" ## Work in LAN deported desktop myIPFSGW="$(myIpfsGw)" myTUBE="$(myTube)" myASTROTUBE="https://$(myAstroTube)"