change sh to bash to support source on all distributions
This commit is contained in:
parent
2fbec4da69
commit
706c29e480
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue