Browse Source

A_dead_swarm.txt (no ipfstryme, no connect) reset every "TAG refresh" period

pull/32/head
qo-op 9 months ago
parent
commit
f43cf5e542
  1. 2
      zen/gchange_IPFS_swarm.sh
  2. 3
      zen/ipfs_SWARM_refresh.sh

2
zen/gchange_IPFS_swarm.sh

@ -58,7 +58,7 @@ do
[ $nbmessage -gt 1 ] && echo "Delete $nbmessage OLD 'ipfstryme' messages from $whoisg1" && ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey delete -i $messageid
sleep 0.5
done
[[ $nbmessage == 0 ]] && echo "NO ipfstryme MESSAGE from $whoisg1" && continue
[[ $nbmessage == 0 ]] && echo "NO ipfstryme MESSAGE from $whoisg1" && echo "$ipfsnodeid" >> ~/.zen/A_dead_swarm.txt && continue
# SEND MESSAGE ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey send -d $whoisg1 -t 'Astroport' -m 'Aucun message de ta part https://copylaradio.com'"
# REFRESH A_swarm_map.txt

3
zen/ipfs_SWARM_refresh.sh

@ -34,7 +34,6 @@ timestamp=$(date -u +%s%N | cut -b1-13)
[[ "$1" == "quick" ]] && echo "" > /tmp/A_swarm || cat ~/.zen/A_swarm_map.txt > /tmp/A_swarm
rm /tmp/treated.ipfs.swarm
touch /tmp/treated.ipfs.swarm
touch ~/.zen/A_dead_swarm.txt
## RESET BOOTSTRAP LIST
ipfs bootstrap rm --all > /dev/null 2>&1
@ -75,7 +74,7 @@ do
ipfs swarm connect "$peerline"
if [ $? != 0 ]; then
grep -vEi $ip ~/.zen/A_my_swarm.txt
echo $ipfsnodeid > ~/.zen/A_dead_swarm.txt
echo $ipfsnodeid >> ~/.zen/A_dead_swarm.txt
echo "SEND MESSAGE ABOUT UNREACHABLE FRIEND $whoisg1 ($XID) ($XZUID)"
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey send -d $G1PUB -t "ALERT" -m "Impossible de se synchroniser avec $whoisg1 ($XID) ($XZUID)"
# KEEPING LAST 10 ALERT MESSAGES

Loading…
Cancel
Save