Add Raw USB Mapping

This commit is contained in:
Gautham Varma K
2021-09-09 14:19:58 +05:30
parent 1afe905387
commit 0746681000
2 changed files with 36 additions and 3 deletions
+12 -3
View File
@@ -2,12 +2,13 @@
"name": "TVHeadend", "name": "TVHeadend",
"version": "dev", "version": "dev",
"stage": "experimental", "stage": "experimental",
"slug": "addon-tvheadend", "slug": "tvheadend",
"description": "TV streaming server and recorder.", "description": "TV streaming server and recorder.",
"url": "https://github.com/GauthamVarmaK/addon-tvheadend", "url": "https://github.com/GauthamVarmaK/addon-tvheadend",
"startup": "services", "startup": "application",
"arch": ["aarch64", "amd64", "armhf", "armv7", "i386"], "arch": ["aarch64", "amd64", "armhf", "armv7", "i386"],
"webui": "http://[HOST]:[PORT:9981]/", "webui": "http://[HOST]:[PORT:9981]/",
"usb": true,
"ports": { "ports": {
"9981/tcp": 9981, "9981/tcp": 9981,
"9982/tcp": 9982 "9982/tcp": 9982
@@ -16,5 +17,13 @@
"9981/tcp": "TVH Web Interface", "9981/tcp": "TVH Web Interface",
"9982/tcp": "TVH HTSP" "9982/tcp": "TVH HTSP"
}, },
"map": ["config:rw"] "map": ["config:rw"],
"options": {
"system_packages": [],
"init_commands": []
},
"schema":{
"system_packages": ["str"],
"init_commands": ["str"]
}
} }
@@ -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