This commit is contained in:
Hans Karlinius
2024-11-30 09:05:27 +01:00
parent 0fd9dc8a71
commit 93af4256b8
21 changed files with 24 additions and 65 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/command/with-contenv bashio
if bashio::config.has_value 'autofind'; then
autofind=($(bashio::config 'autofind'))
bashio::log.info "Set AUTOFIND hub to ${autofind}"
if [ "${autofind}" = "true" ]; then
/usr/bin/vhconfig_edit General AutoFind 1
else
/usr/bin/vhconfig_edit General AutoFind 0
fi
fi
if bashio::config.has_value 'clientid'; then
clientid=($(bashio::config 'clientid'))
bashio::log.info "Set ClientId to ${clientid}"
/usr/bin/vhconfig_edit General ClientId ${clientid}
fi
if bashio::config.has_value 'manualhub'; then
manualhub=($(bashio::config 'manualhub'))
bashio::log.info "Set HUB to ${manualhub}"
/usr/bin/vhclient -t "MANUAL HUB ADD,${manualhub}"
fi
if bashio::config.has_value 'autouse'; then
autouse=($(bashio::config 'autouse'))
bashio::log.info "Set AUTOUSE all devices to ${autouse}"
if [ "${autouse}" = "true" ]; 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