This repository has been archived on 2025-01-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
hasio-addons/mopidy-addon/rootfs/etc/services.d/mopidy/run
2022-03-16 12:35:10 +01:00

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[@]}"