Update use device on/off
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user