Navidrome: Explicitly export shell variables for Navidrome to pick up

This commit is contained in:
Arunan Balasubramaniam
2024-08-20 19:29:25 +01:00
parent 790b73ce92
commit b05e07ad94
2 changed files with 21 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
- Make config options work by splitting default values and schemas - Make config options work by splitting default values and schemas
- Exclude the cache from backups - Exclude the cache from backups
- Expose more Navidrome config options - Expose more Navidrome config options
- Explicitly export shell variables for Navidrome to pick up
## 0.52.5-6 (17-08-2024) ## 0.52.5-6 (17-08-2024)

View File

@@ -6,43 +6,63 @@ set -e
# https://www.navidrome.org/docs/usage/configuration-options/#available-options # https://www.navidrome.org/docs/usage/configuration-options/#available-options
ND_MUSICFOLDER=$(bashio::config 'music_folder') ND_MUSICFOLDER=$(bashio::config 'music_folder')
export ND_MUSICFOLDER
ND_DATAFOLDER=$(bashio::config 'data_folder') ND_DATAFOLDER=$(bashio::config 'data_folder')
export ND_DATAFOLDER
ND_LOGLEVEL=$(bashio::config 'log_level') ND_LOGLEVEL=$(bashio::config 'log_level')
export ND_LOGLEVEL
ND_BASEURL=$(bashio::config 'base_url') ND_BASEURL=$(bashio::config 'base_url')
export ND_BASEURL
if bashio::config.true 'ssl'; then if bashio::config.true 'ssl'; then
bashio::log.info "ssl is enabled" bashio::log.info "ssl is enabled"
ND_TLSCERT=$(bashio::config 'certfile') ND_TLSCERT=$(bashio::config 'certfile')
export ND_TLSCERT
ND_TLSKEY=$(bashio::config 'keyfile') ND_TLSKEY=$(bashio::config 'keyfile')
export ND_TLSKEY
fi fi
if bashio::config.has_value 'default_language'; then if bashio::config.has_value 'default_language'; then
ND_DEFAULTLANGUAGE=$(bashio::config 'default_language') ND_DEFAULTLANGUAGE=$(bashio::config 'default_language')
export ND_DEFAULTLANGUAGE
fi fi
if bashio::config.has_value 'image_cache_size'; then if bashio::config.has_value 'image_cache_size'; then
ND_IMAGECACHESIZE=$(bashio::config 'image_cache_size') ND_IMAGECACHESIZE=$(bashio::config 'image_cache_size')
export ND_IMAGECACHESIZE
fi fi
if bashio::config.has_value 'lastfm_api_key'; then if bashio::config.has_value 'lastfm_api_key'; then
ND_LASTFM_APIKEY=$(bashio::config 'lastfm_api_key') ND_LASTFM_APIKEY=$(bashio::config 'lastfm_api_key')
export ND_LASTFM_APIKEY
fi fi
if bashio::config.has_value 'lastfm_secret'; then if bashio::config.has_value 'lastfm_secret'; then
ND_LASTFM_SECRET=$(bashio::config 'lastfm_secret') ND_LASTFM_SECRET=$(bashio::config 'lastfm_secret')
export ND_LASTFM_SECRET
fi fi
if bashio::config.has_value 'password_encryption_key'; then if bashio::config.has_value 'password_encryption_key'; then
ND_PASSWORDENCRYPTIONKEY=$(bashio::config 'password_encryption_key') ND_PASSWORDENCRYPTIONKEY=$(bashio::config 'password_encryption_key')
export ND_PASSWORDENCRYPTIONKEY
fi fi
if bashio::config.has_value 'scan_schedule'; then if bashio::config.has_value 'scan_schedule'; then
ND_SCANSCHEDULE=$(bashio::config 'scan_schedule') ND_SCANSCHEDULE=$(bashio::config 'scan_schedule')
export ND_SCANSCHEDULE
fi fi
if bashio::config.has_value 'spotify_id'; then if bashio::config.has_value 'spotify_id'; then
ND_SPOTIFY_ID=$(bashio::config 'spotify_id') ND_SPOTIFY_ID=$(bashio::config 'spotify_id')
export ND_SPOTIFY_ID
fi fi
if bashio::config.has_value 'spotify_secret'; then if bashio::config.has_value 'spotify_secret'; then
ND_SPOTIFY_SECRET=$(bashio::config 'spotify_secret') ND_SPOTIFY_SECRET=$(bashio::config 'spotify_secret')
export ND_SPOTIFY_SECRET
fi fi
if bashio::config.has_value 'transcoding_cache_size'; then if bashio::config.has_value 'transcoding_cache_size'; then
ND_TRANSCODINGCACHESIZE=$(bashio::config 'transcoding_cache_size') ND_TRANSCODINGCACHESIZE=$(bashio::config 'transcoding_cache_size')
export ND_TRANSCODINGCACHESIZE
fi fi
if bashio::config.has_value 'welcome_message'; then if bashio::config.has_value 'welcome_message'; then
ND_UIWELCOMEMESSAGE=$(bashio::config 'welcome_message') ND_UIWELCOMEMESSAGE=$(bashio::config 'welcome_message')
export ND_UIWELCOMEMESSAGE
fi fi
@@ -53,4 +73,3 @@ fi
bashio::log.info "Please wait while the app is loading!" bashio::log.info "Please wait while the app is loading!"
/app/navidrome /app/navidrome