Update use device on/off
This commit is contained in:
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
autouse=$(bashio::cache.get autouse)
|
||||
if $autouse; then
|
||||
bashio::log.info "AutoShare enabled, will not use devices from configuration"
|
||||
bashio::log.info "AutoShare All enabled, will not use devices from configuration"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -21,6 +21,12 @@ if bashio::config.has_value 'usbdevices'; then
|
||||
use=$(echo $usbdevice | jq '. | if .use then true else false end')
|
||||
device=$(echo $usbdevice | jq '.device | tostring')
|
||||
deviceid=$(echo $device | sed 's/.*(\(.*\)).*/\1/g')
|
||||
|
||||
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-${deviceid2}"
|
||||
|
||||
if $use; then
|
||||
bashio::log.info "AUTO USE DEVICE,${deviceid}"
|
||||
/usr/bin/vhclient -t "AUTO USE DEVICE,${deviceid}"
|
||||
|
||||
Reference in New Issue
Block a user