This commit is contained in:
qo-op 2021-06-04 05:54:26 +02:00
parent aec8bfc7ba
commit 572fdd0ece
1 changed files with 17 additions and 11 deletions

View File

@ -41,11 +41,17 @@ do
## Get "/tmp/ipfstryme.$liking_me" from Gchange "ipfstryme" message
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" read -n300 -j | jq -r --arg friendKEY "$liking_me" '.[] | select(.pubkey == $friendKEY)' | jq 'select(.title == "ipfstryme")' | jq -r '.content' > /tmp/ipfstryme.$liking_me
# CLEAN /tmp/ipfstryme.$liking_me
for line in $(cat /tmp/ipfstryme.$liking_me);
do
[[ $line == "" ]] && break
echo $line >> /tmp/ipfstryme.clean
done
cat /tmp/ipfstryme.clean | sort | uniq > /tmp/ipfstryme.$liking_me
## ZOMBIE NODE sends more that 300 ipfstryme ?
[[ $(cat /tmp/ipfstryme.$liking_me | sort | uniq | wc -l) -gt 300 ]] && echo "THIS NODE IS A ZOMBIE..." && rm -f /tmp/ipfstryme.$liking_me && continue
cat /tmp/ipfstryme.$liking_me
echo "__________________________________________"
done
for peerline in $(cat /tmp/ipfstryme.* | sort | uniq);