diff --git a/collector.sh b/collector.sh index 959ae89..0d444ba 100755 --- a/collector.sh +++ b/collector.sh @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/usr/bin/bash # Collects and logs data from the OpenShipData API and the OSM API # source ./secrets @@ -23,7 +23,7 @@ country=$(echo "$osm_response" | jq --raw-output .address.country) echo "La ville la plus proche est $town dans la province de $province, $country" -curl -s -d "Donnees collectes" $NTFY_ENDPOINT +#curl -s -d "Donnees collectes" $NTFY_ENDPOINT # store values in file if ! [ -e "$DATA_FILE" ] ; then @@ -36,7 +36,7 @@ if ! [ -w "$DATA_FILE" ] ; then exit 1 fi -timestamp=$(date) +timestamp=$(date -u +"%Y-%m-%d %H:%M:%S UTC") echo "\"$timestamp\",$lat,$lon,$bearing,$speed,\"$town\",\"$province\",\"$country\"" >> $DATA_FILE exit 0