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/cont-init.d/packages.sh
2022-03-16 12:35:10 +01:00

23 lines
838 B
Bash

#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Mopidy
# Install user configured/requested packages
# ==============================================================================
if bashio::config.has_value 'system_packages'; then
apt update \
|| bashio::exit.nok 'Failed updating Ubuntu packages repository indexes'
for package in $(bashio::config 'system_packages'); do
apt install -y "$package" \
|| bashio::exit.nok "Failed installing package ${package}"
done
fi
if bashio::config.has_value 'python_packages'; then
for package in $(bashio::config 'python_packages'); do
pip install "$package" \
|| bashio::exit.nok "Failed installing package ${package}"
done
fi