Fix possible from p2p.legal infra or custom

This commit is contained in:
poka 2021-03-30 14:45:19 +02:00
parent 52c94e9f4d
commit 19d21c5846
1 changed files with 7 additions and 1 deletions

View File

@ -9,9 +9,15 @@ SOURCE="https://g1-stats.axiom-team.fr/data/wallets-g1-membres.txt"
FILE="/tmp/geoloc-members.json"
FINAL_LOCATION="$WEBPATH/data"
if [[ -f /home/axiom/apps/g1-stats/data/wallets-g1-membres.txt ]]; then
DATA=$(cat /home/axiom/apps/g1-stats/data/wallets-g1-membres.txt)
else
DATA=$(curl -s $SOURCE)
fi
echo "[" > $FILE
for i in $(curl -s $SOURCE); do
for i in $DATA; do
result=$(jaklis get -p $i)
geoPoint=$(echo "$result" | jq .geoPoint 2>/dev/null)