Update use device on/off

This commit is contained in:
Hans Karlinius
2025-06-06 22:41:38 +02:00
parent 3eb0d5cc20
commit 3c572c5736

View File

@@ -25,12 +25,12 @@ if bashio::config.has_value 'usbdevices'; then
#server_serial=$(/usr/bin/vh_server_serial_number ${deviceid%.*})
#device2=$(/usr/bin/vh_usb_product_vendor $deviceid)
#deviceid2="${server_serial}.${device2}"
bashio::log.info "GURKA-${inuse_devices[@]}"
#bashio::log.info "GURKA-${inuse_devices[@]}"
if [[ ${inuse_devices[@]} =~ .*${deviceid}.* ]]; then
if $use; then
bashio::log.info "AUTO USE DEVICE,${deviceid} - already in use"
else
if ! $use; then
# bashio::log.info "AUTO USE DEVICE,${deviceid} - already in use"
# else
bashio::log.info "STOP USING,${deviceid}"
/usr/bin/vhclient -t "STOP USING,${deviceid}"
fi
@@ -38,8 +38,8 @@ if bashio::config.has_value 'usbdevices'; then
if $use; then
bashio::log.info "AUTO USE DEVICE,${deviceid}"
/usr/bin/vhclient -t "AUTO USE DEVICE,${deviceid}"
else
bashio::log.info "STOP USING,${deviceid} - not in use"
# else
# bashio::log.info "STOP USING,${deviceid} - not in use"
fi
fi