test
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
#!/command/with-contenv bashio
|
||||
|
||||
#if bashio::config.has_value 'clientid'; then
|
||||
# clientid=($(bashio::config 'clientid'))
|
||||
# bashio::log.info "Set ClientId to ${clientid}"
|
||||
#fi
|
||||
if bashio::config.has_value 'autouse'; then
|
||||
autouse=($(bashio::config 'autouse'))
|
||||
bashio::log.info "Set AUTOUSE all devices to ${autouse}"
|
||||
if autouse; then
|
||||
/usr/bin/vhclient -t "AUTO USE ALL"
|
||||
else
|
||||
/usr/bin/vhclient -t "AUTO USE CLEAR ALL"
|
||||
fi
|
||||
fi
|
||||
|
||||
if bashio::config.has_value 'autofind'; then
|
||||
autofind=($(bashio::config 'autofind'))
|
||||
bashio::log.info "Set AUTOFIND ${autofind}"
|
||||
bashio::log.info "Set AUTOFIND hub to ${autofind}"
|
||||
# TODO: check before toggle
|
||||
/usr/bin/vhclient -t "AUTOFIND"
|
||||
fi
|
||||
|
||||
#TEST
|
||||
#bashio::addon.option 'usbdevices' { 'name': 'one', 'use': false}
|
||||
#my_array=($(bashio::config 'usbdevices'))
|
||||
#my_array+=('one') # Add a new item to the array
|
||||
#my_array+=({ 'name': 'one', 'use': false}) # Add a new item to the array
|
||||
#bashio::config::update 'usbdevices' "${my_array[@]}"
|
||||
#bashio::log.info "${my_array[@]}"
|
||||
#bashio::config::update 'usbdevices' "${my_array[@]}"
|
||||
#bashio::log.info "${my_array[@]}"
|
||||
if bashio::config.has_value 'hub'; then
|
||||
hub=($(bashio::config 'hub'))
|
||||
bashio::log.info "Set HUB to ${hub}"
|
||||
/usr/bin/vhclient -t "MANUAL HUB ADD,${hub}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user