log correction
This commit is contained in:
parent
5cd58ce56f
commit
d123d11e85
|
@ -16,7 +16,7 @@ IamInLAN=$(echo $myIP | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\
|
|||
|
||||
#EXTERNIP=$(curl -s http://whatismyip.akamai.com/)
|
||||
########################################################################
|
||||
echo "CREATING MY /home/$USER/.zen/ipfs/.${IPFSNODEID}/tryme.addr"
|
||||
echo "CREATING MY /home/$YOU/.zen/ipfs/.${IPFSNODEID}/tryme.addr"
|
||||
########################################################################
|
||||
mkdir -p ~/.zen/ipfs/.${IPFSNODEID}
|
||||
# echo "/ip4/$EXTERNIP/udp/4001/astro/p2p/${IPFSNODEID}" >> /home/$YOU/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
|
@ -37,17 +37,17 @@ do
|
|||
[[ ! $isLAN ]] && echo "$tryme" >> ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
done
|
||||
|
||||
## Add "liking me" in "swarm peers" station
|
||||
## Add "liking me" in "swarm peers" station
|
||||
if [[ -f /tmp/liking_me ]]; then
|
||||
for liking_me in $(cat /tmp/liking_me | sort | uniq);
|
||||
do
|
||||
ipfsnodeid=$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $liking_me)
|
||||
[[ -f /tmp/ipfs_swarm_peers ]] && ipfsaddress=$(cat /tmp/ipfs_swarm_peers | grep $ipfsnodeid | tail -n 1)
|
||||
if [[ $ipfsaddress ]]; then
|
||||
nodeip=$(echo $ipfsaddress | cut -d '/' -f 3)
|
||||
IsLAN=$(echo $nodeip | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" )
|
||||
[[ ! $IsLAN ]] && echo "$ipfsaddress" >> ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
fi
|
||||
ipfsnodeid=$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $liking_me)
|
||||
[[ -f /tmp/ipfs_swarm_peers ]] && ipfsaddress=$(cat /tmp/ipfs_swarm_peers | grep $ipfsnodeid | tail -n 1)
|
||||
if [[ $ipfsaddress ]]; then
|
||||
nodeip=$(echo $ipfsaddress | cut -d '/' -f 3)
|
||||
IsLAN=$(echo $nodeip | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/" )
|
||||
[[ ! $IsLAN ]] && echo "$ipfsaddress" >> ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue