diff --git a/zen/ipfs_SWARM_refresh.sh b/zen/ipfs_SWARM_refresh.sh index 0cdaf4a..3984e0b 100755 --- a/zen/ipfs_SWARM_refresh.sh +++ b/zen/ipfs_SWARM_refresh.sh @@ -53,10 +53,9 @@ do echo "${peerline}" myfriendpeer=$(cat ~/.zen/A_my_swarm.txt | grep $ipfsnodeid ) if [[ "$myfriendpeer" != "" ]]; then + [[ ! $(ipfs swarm peers | grep $ipfsnodeid) ]] && ipfs swarm connect "$peerline" && ipfs bootstrap add "$peerline" echo "OK REFRESH /ipns/$ipfsnodeid INTO ~/.zen/ipfs_swarm/" $MY_PATH/tools/timeout.sh -t 20 ipfs get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfsnodeid - ipfs swarm connect $peerline - ipfs bootstrap add $peerline else echo "KO ___________________ # YOU CAN ACTIVATE FAIL2BAN" # PLEASE ADD $USER NOPASSWD:ALL for fail2ban-client in /etc/sudoers