This commit is contained in:
Hans Karlinius
2024-12-01 06:08:51 +01:00
parent 251c0afbed
commit 61c152deb1
4 changed files with 19 additions and 38 deletions
@@ -4,32 +4,23 @@ options=$(bashio::api.supervisor GET "/addons/self/options/config")
autofind=$(echo $options | jq '. | if .autofind then true else false end')
autouse=$(echo $options | jq '. | if .autouse then true else false end')
#if bashio::config.has_value 'autofind'; then
#autofind=($(bashio::config 'autofind'))
bashio::log.info "Set AUTOFIND hub to ${autofind}"
#if [ "${autofind}" = "true" ]; then
if $autofind; then
bashio::log.info "Enable AutoFind"
/usr/bin/vh_edit_config General AutoFind 1
else
bashio::log.info "Disable AutoFind"
/usr/bin/vh_edit_config General AutoFind 0
fi
#fi
if $autofind; then
bashio::log.info "Enable AutoFind"
/usr/bin/vh_edit_config General AutoFind 1
else
bashio::log.info "Disable AutoFind"
/usr/bin/vh_edit_config General AutoFind 0
fi
#if bashio::config.has_value 'autouse'; then
#autouse=($(bashio::config 'autouse'))
#if [ "${autouse}" = "true" ]; then
if $autouse; then
bashio::log.info "AUTO USE ALL"
/usr/bin/vhclient -t "AUTO USE ALL"
else
bashio::log.info "AUTO USE CLEAR ALL"
/usr/bin/vhclient -t "AUTO USE CLEAR ALL"
bashio::log.info "STOP USING ALL LOCAL"
/usr/bin/vhclient -t "STOP USING ALL LOCAL"
fi
#fi
if $autouse; then
bashio::log.info "AUTO USE ALL"
/usr/bin/vhclient -t "AUTO USE ALL"
else
bashio::log.info "AUTO USE CLEAR ALL"
/usr/bin/vhclient -t "AUTO USE CLEAR ALL"
bashio::log.info "STOP USING ALL LOCAL"
/usr/bin/vhclient -t "STOP USING ALL LOCAL"
fi
if bashio::config.has_value 'clientid'; then
clientid=($(bashio::config 'clientid'))