20 lines
634 B
Plaintext
20 lines
634 B
Plaintext
#!/usr/bin/with-contenv bashio
|
|
# ==============================================================================
|
|
# Home Assistant Community Add-on: Mopidy
|
|
# Runs the Mopidy
|
|
# ==============================================================================
|
|
declare -a options
|
|
|
|
bashio::log.info "Starting Mopidy..."
|
|
|
|
for var in $(bashio::config 'settings|keys'); do
|
|
name=$(bashio::config "settings[${var}].name")
|
|
value=$(bashio::config "settings[${var}].value")
|
|
bashio::log.info "Setting ${name} to ${value}"
|
|
|
|
options+=(-o "${name}=${value}")
|
|
done
|
|
|
|
# Run Mopidy
|
|
exec mopidy --config /etc/mopidy/mopidy.conf "${options[@]}"
|