Skip to content

Commit

Permalink
✨ Add Raw USB Mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
GauthamVarmaK committed Sep 9, 2021
1 parent 1afe905 commit 0746681
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tvheadend/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "TVHeadend",
"version": "dev",
"stage": "experimental",
"slug": "addon-tvheadend",
"slug": "tvheadend",
"description": "TV streaming server and recorder.",
"url": "https://github.com/GauthamVarmaK/addon-tvheadend",
"startup": "services",
"startup": "application",
"arch": ["aarch64", "amd64", "armhf", "armv7", "i386"],
"webui": "http://[HOST]:[PORT:9981]/",
"usb": true,
"ports": {
"9981/tcp": 9981,
"9982/tcp": 9982
Expand All @@ -16,5 +17,13 @@
"9981/tcp": "TVH Web Interface",
"9982/tcp": "TVH HTSP"
},
"map": ["config:rw"]
"map": ["config:rw"],
"options": {
"system_packages": [],
"init_commands": []
},
"schema":{
"system_packages": ["str"],
"init_commands": ["str"]
}
}
24 changes: 24 additions & 0 deletions tvheadend/rootfs/etc/cont-init.d/customizations.sh
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

0 comments on commit 0746681

Please sign in to comment.