forked from axiom-team/astrXbian
swarm of friends testing
This commit is contained in:
parent
e200d78498
commit
bff9bee2dc
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
if [[ $(date +%s -r /tmp/liking_me) -lt $(date +%s --date="1 day ago") ]]; then
|
||||
echo "...... refreshing /tmp/liking_me"
|
||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' > /tmp/liking_me
|
||||
fi
|
||||
|
||||
for liking_me in $(cat /tmp/liking_me);
|
||||
do
|
||||
echo "$liking_me is liking me"
|
||||
station=$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $liking_me)
|
||||
# ipfs --timeout=6s ls /ipns/$station
|
||||
TEST=$(~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars -p $liking_me | jq -r '.yours.level')
|
||||
if [ ! $TEST == 'null' ]; then
|
||||
echo "$station is my friend"
|
||||
ipfs --timeout=6s cat /ipns/$station/.$station/_xbian.zuid
|
||||
[ ! $? == 0 ] && echo "UNAVAILABLE FRIEND $liking_me"
|
||||
sleep 1
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue