From 65bff377123c4c326b40300900de9eef81ffee0a Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 6 Dec 2023 01:11:34 +0100 Subject: [PATCH] isLAN = ipfs.$(hostname).local:8080 & astroport.$(hostname).local:1234 --- 12345.sh | 2 +- setup.sh | 2 +- tools/my.sh | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/12345.sh b/12345.sh index 68f2ae39..2a94328c 100755 --- a/12345.sh +++ b/12345.sh @@ -133,7 +133,7 @@ while true; do ( nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && echo " (‿/‿) $PORT CONSUMED in "`expr $(date +%s) - $start`" seconds." ) & else mySalt | \ - sed "s~http://127.0.0.1:12345~http://${myIP}:${PORT}~g" | \ + sed "s~http://127.0.0.1:12345~http://${myASTROPORT}:${PORT}~g" | \ sed "s~https://ipfs.copylaradio.com/ipns/copylaradio.com~${myUPLANET}~g" | \ ( nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && echo " (‿/‿) $PORT CONSUMED in "`expr $(date +%s) - $start`" seconds." ) & fi diff --git a/setup.sh b/setup.sh index d9d51492..1fc3c042 100755 --- a/setup.sh +++ b/setup.sh @@ -121,7 +121,7 @@ fi if [[ ! $(cat /etc/hosts | grep -w "astroport.local" | head -n 1) ]]; then cat /etc/hosts > /tmp/hosts - echo "127.0.1.1 $(hostname) $(hostname).local astroport astroport.local" >> /tmp/hosts + echo "127.0.1.1 $(hostname) $(hostname).local astroport.$(hostname).local ipfs.$(hostname).local astroport.local" >> /tmp/hosts sudo cp /tmp/hosts /etc/hosts && rm /tmp/hosts fi diff --git a/tools/my.sh b/tools/my.sh index 76986804..49ddca6a 100755 --- a/tools/my.sh +++ b/tools/my.sh @@ -433,8 +433,8 @@ 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" #astroport.localhost myASTROPORT="http://${myIP}:1234" # BE ACCESSIBLE THROUGH LAN +myASTROPORT="http://astroport.$(hostname).local:1234" #astroport.localhost myAPI="http://${myIP}:5001" myDATA="https://data.gchange.fr" myGCHANGE="https://www.gchange.fr" @@ -443,6 +443,7 @@ myG1BILLET="http://${myIP}:33101" myHOST="$(myHostName)" myIPFS="http://${myIP}:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. +myIPFS="http://ipfs.$(hostname).local:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. myIPFSGW="$(myIpfsGw)" myTUBE="$(myTube)" myASTROTUBE="https://$(myAstroTube)"