Update use device on/off
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 0.3.0
|
||||||
|
|
||||||
|
- Update handling of setting device to used and not used.
|
||||||
|
|
||||||
## 0.2.1
|
## 0.2.1
|
||||||
|
|
||||||
- Added documentation.
|
- Added documentation.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ arch:
|
|||||||
- aarch64
|
- aarch64
|
||||||
- amd64
|
- amd64
|
||||||
- i386
|
- i386
|
||||||
url: "https://git.carlscrona.se/haka/home-assistant-addons"
|
url: "https://github.com/hans99/home-assistant-addons"
|
||||||
startup: services
|
startup: services
|
||||||
host_network: true
|
host_network: true
|
||||||
hassio_api: true
|
hassio_api: true
|
||||||
|
|||||||
@@ -28,12 +28,16 @@ if bashio::config.has_value 'usbdevices'; then
|
|||||||
bashio::log.info "GURKA-${deviceid2}"
|
bashio::log.info "GURKA-${deviceid2}"
|
||||||
|
|
||||||
if $use; then
|
if $use; then
|
||||||
bashio::log.info "AUTO USE DEVICE,${deviceid}"
|
#bashio::log.info "AUTO USE DEVICE,${deviceid}"
|
||||||
/usr/bin/vhclient -t "AUTO USE DEVICE,${deviceid}"
|
#/usr/bin/vhclient -t "AUTO USE DEVICE,${deviceid}"
|
||||||
|
bashio::log.info "AutoShare ${deviceid2} on"
|
||||||
|
/usr/bin/vh_editini AutoShare $deviceid2 1
|
||||||
else
|
else
|
||||||
if [[ "${inuse_devices[@]}" =~ "$device" ]]; then
|
if [[ "${inuse_devices[@]}" =~ "$device" ]]; then
|
||||||
bashio::log.info "STOP USING,${deviceid}"
|
#bashio::log.info "STOP USING,${deviceid}"
|
||||||
/usr/bin/vhclient -t "STOP USING,${deviceid}"
|
#/usr/bin/vhclient -t "STOP USING,${deviceid}"
|
||||||
|
bashio::log.info "AutoShare ${deviceid2} off"
|
||||||
|
/usr/bin/vh_editini AutoShare $deviceid2 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user