mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
60 stars 30 forks source link

Setting label io.balena.features.balena-api #48

Closed hferentschik closed 2 years ago

hferentschik commented 2 years ago

This ensures the BALENA_API_KEY is injected into the container and start.sh can successfully set the EUI tag.

Without the label, _BALENA_APIKEY is not available in the container and the script logs a parse error originating from this line where _BALENA_APIKEY will be empty.

ID=$(curl -sX GET "https://api.balena-cloud.com/v5/device?\$filter=uuid%20eq%20'$BALENA_DEVICE_UUID'" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $BALENA_API_KEY" | \
jq ".d | .[0] | .id")