Update use device on/off

This commit is contained in:
Hans Karlinius
2025-06-06 22:55:23 +02:00
parent 2ed3c9d48d
commit 06ea647aaf

View File

@@ -31,13 +31,13 @@ if bashio::config.has_value 'usbdevices'; then
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}" | sed 's/\n/ - /g'
result=$(/usr/bin/vhclient -t "STOP USING,${deviceid}")
bashio::log.info "STOP USING,${deviceid} - ${result}"
fi
else
if $use; then
bashio::log.info "AUTO USE DEVICE,${deviceid}"
/usr/bin/vhclient -t "AUTO USE DEVICE,${deviceid}" | sed 's/\n/ - /g'
result=$(/usr/bin/vhclient -t "AUTO USE DEVICE,${deviceid}")
bashio::log.info "AUTO USE DEVICE,${deviceid} - ${result}"
# else
# bashio::log.info "STOP USING,${deviceid} - not in use"
fi