From 4e153f9ef3bdde3f21dfdc513713e95970c347b5 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 30 Dec 2023 21:05:26 +0100 Subject: [PATCH] better --- RUNTIME/UPLANET.refresh.sh | 3 +-- tools/mailjet.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/RUNTIME/UPLANET.refresh.sh b/RUNTIME/UPLANET.refresh.sh index 4bb09089..b83e0d32 100755 --- a/RUNTIME/UPLANET.refresh.sh +++ b/RUNTIME/UPLANET.refresh.sh @@ -239,10 +239,9 @@ echo "" > ~/.z ### JSON UMAP SCRAPPING #################################### ## RECORD P4N SPOT DATA - curl -s "https://www.park4night.com/api/places/around?lat=${LAT}&lng=${LON}&radius=200&filter=%7B%7D&lang=fr" -o ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json - echo "P4N : https://www.park4night.com/api/places/around?lat=${LAT}&lng=${LON}&radius=200&filter=%7B%7D&lang=fr" [[ -s ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json ]] \ + && curl -s "https://www.park4night.com/api/places/around?lat=${LAT}&lng=${LON}&radius=200&filter=%7B%7D&lang=fr" -o ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json \\ && [[ $(stat -c %s ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json) -gt $(stat -c %s ~/.zen/tmp/${MOATS}/${UMAP}/p4n.json) ]] \ && mv ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json ~/.zen/tmp/${MOATS}/${UMAP}/p4n.json \ && echo "UPDATED" \ diff --git a/tools/mailjet.sh b/tools/mailjet.sh index 15bfa0d9..fc1b2535 100755 --- a/tools/mailjet.sh +++ b/tools/mailjet.sh @@ -23,7 +23,7 @@ mail="$1" # EMAIL DESTINATAIRE messfile="$2" # FICHIER A AJOUTER AU CORPS MESSAGE -SUBJECT="[UPlanet] Astroport : $(myHostName)" +SUBJECT="[UPlanet/Astroport] : $(myHostName)" MESSAGE="Bonjour $PLAYER UN MESSAGE POUR VOUS. @@ -78,7 +78,7 @@ json_payload='{ "To": [ { "Email": "'${RECIPIENT_EMAIL}'", - "Name": "UPlanet Astronaut" + "Name": "Astronaut" } ], "Bcc": [