better, faster, stronger
This commit is contained in:
parent
572fdd0ece
commit
3f64b65f3f
|
@ -21,6 +21,7 @@ fi
|
||||||
# Force Strict #swarm0 !!?
|
# Force Strict #swarm0 !!?
|
||||||
rm -f /tmp/ipfstryme.*
|
rm -f /tmp/ipfstryme.*
|
||||||
rm -f ~/.zen/A_Qm_swarm.txt
|
rm -f ~/.zen/A_Qm_swarm.txt
|
||||||
|
|
||||||
liking_me_count=0
|
liking_me_count=0
|
||||||
friend_of_mine_count=0
|
friend_of_mine_count=0
|
||||||
echo $(date)
|
echo $(date)
|
||||||
|
@ -41,15 +42,19 @@ do
|
||||||
## Get "/tmp/ipfstryme.$liking_me" from Gchange "ipfstryme" message
|
## 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
|
~/.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
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
# CLEAN /tmp/ipfstryme.$liking_me
|
# CLEAN /tmp/ipfstryme.$liking_me
|
||||||
|
> /tmp/ipfstryme.clean
|
||||||
for line in $(cat /tmp/ipfstryme.$liking_me);
|
for line in $(cat /tmp/ipfstryme.$liking_me);
|
||||||
do
|
do
|
||||||
[[ $line == "" ]] && break
|
[[ $line == "" ]] && break
|
||||||
echo $line >> /tmp/ipfstryme.clean
|
ipfsnodeid=$(echo $line | rev | cut -d '/' -f 1 | rev)
|
||||||
|
[[ ! $(cat /tmp/ipfstryme.clean | grep $ipfsnodeid) ]] && echo $line >> /tmp/ipfstryme.clean
|
||||||
done
|
done
|
||||||
|
|
||||||
cat /tmp/ipfstryme.clean | sort | uniq > /tmp/ipfstryme.$liking_me
|
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
|
cat /tmp/ipfstryme.$liking_me
|
||||||
echo "__________________________________________"
|
echo "__________________________________________"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue