fix ipfs init alone script
This commit is contained in:
parent
a5c9ac52ee
commit
61dfffbcab
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue