-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1afe905
commit 0746681
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/with-contenv bashio | ||
# ============================================================================== | ||
# 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 |