Files
tvheadend/tvheadend/rootfs/etc/s6-overlay/s6-rc.d/init-customizations/run
T
Gautham Varma K ad2e249a87 🛂 Update exec permissions
2023-02-25 10:13:49 +05:30

26 lines
940 B
Plaintext
Executable File

#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: TVHeadend
# Executes user customizations on startup
# ==============================================================================
# Install user configured/requested packages
if bashio::config.has_value 'system_packages'; then
apk update \
|| bashio::exit.nok 'Failed updating Alpine packages repository indexes'
for package in $(bashio::config 'system_packages'); do
apk add "$package" \
|| bashio::exit.nok "Failed installing system package ${package}"
done
fi
# Executes user commands on startup
if bashio::config.has_value 'init_commands'; then
while read -r cmd; do
eval "${cmd}" \
|| bashio::exit.nok "Failed executing init command: ${cmd}"
done <<< "$(bashio::config 'init_commands')"
fi