From 61dfffbcabbd14bb0cdb2652dfc05bcbcd0cbeca Mon Sep 17 00:00:00 2001 From: poka Date: Sat, 6 Jun 2020 00:14:13 +0200 Subject: [PATCH] fix ipfs init alone script --- debug/init_ipfs_keys.sh | 4 ++++ 1 file changed, 4 insertions(+) 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