diff --git a/debug/init_ipfs_keys.sh b/debug/init_ipfs_keys.sh index c53aee8..46c70ec 100644 --- a/debug/init_ipfs_keys.sh +++ b/debug/init_ipfs_keys.sh @@ -1,5 +1,9 @@ #!/bin/bash +# CHECK node IP isLAN? +myIP=$(hostname -I | awk '{print $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])/") + # INIT ipfs [[ $isLAN ]] && ipfs init -p lowpower \ || ipfs init -p server