Fix environment variable handling - version 1.0.3

This commit is contained in:
Jørgen Ferdinand 2025-03-07 22:33:24 +01:00
parent 2eaed37ef6
commit e4d2b85013
2 changed files with 11 additions and 7 deletions

View file

@ -3,10 +3,10 @@ set -e
echo "Starting Newt container..."
# Load config from Home Assistant options
PANGOLIN_ENDPOINT=$(bashio::config 'PANGOLIN_ENDPOINT')
NEWT_ID=$(bashio::config 'NEWT_ID')
NEWT_SECRET=$(bashio::config 'NEWT_SECRET')
# Load config from environment variables
PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT:-"https://example.com"}
NEWT_ID=${NEWT_ID:-"default_id"}
NEWT_SECRET=${NEWT_SECRET:-"default_secret"}
# Ensure Docker is running
if ! docker info >/dev/null 2>&1; then
@ -30,5 +30,5 @@ docker run -d --restart unless-stopped \
echo "Newt container is running!"
# Prevent the script from exiting (Keeps the add-on running)
exec tail -f /dev/null
# Keep the script running
exec tail -f /dev/null