This commit is contained in:
Hans Karlinius
2024-12-01 06:28:18 +01:00
parent 61c152deb1
commit 66c0ae33fa
8 changed files with 33 additions and 32 deletions
@@ -1,6 +1,22 @@
#!/command/with-contenv bashio
/usr/bin/vhclient -t "GET CLIENT STATE"
options=$(bashio::api.supervisor GET "/addons/self/options/config")
autofind=$(echo $options | jq '. | if .autofind then true else false end')
bashio::log.info "Waiting a bit for vhclient ..."
sleep 5s
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 'clientid'; then
clientid=($(bashio::config 'clientid'))
bashio::log.info "Set ClientId to ${clientid}"
/usr/bin/vh_edit_config General ClientId ${clientid}
fi
#bashio::log.info "Waiting a bit for vhclient ..."
#sleep 5s
#/usr/bin/vhclient -t "GET CLIENT STATE"