|
|
|
@ -28,7 +28,7 @@ LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d
|
|
|
|
|
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
|
|
|
|
|
################################################################################
|
|
|
|
|
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
|
|
|
|
isLAN=$(echo $(ip route list match 0/0 | awk '{print $3}') | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
|
|
|
|
isLAN=$(route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
|
|
|
|
[[ ! $myIP || $isLAN ]] && myIP="localhost"
|
|
|
|
|
|
|
|
|
|
[[ $isLAN ]] && myIPFSGW="http://ipfs.localhost:8080" && myASTROPORT="http://astroport.localhost:1234" ## LAN STATION
|
|
|
|
|