test
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
name: VirtualHere Client
|
name: VirtualHere Client
|
||||||
version: "0.1.242"
|
version: "0.1.243"
|
||||||
slug: vhclient
|
slug: vhclient
|
||||||
description: VirtualHere Client
|
description: VirtualHere Client
|
||||||
arch:
|
arch:
|
||||||
|
|||||||
@@ -22,13 +22,14 @@ options=$(bashio::addon.options)
|
|||||||
#mapfile -t devices < <(/usr/bin/vhclient -t LIST)
|
#mapfile -t devices < <(/usr/bin/vhclient -t LIST)
|
||||||
mapfile -t devices < <(/usr/bin/vh_list_devices)
|
mapfile -t devices < <(/usr/bin/vh_list_devices)
|
||||||
for device in "${devices[@]}"; do
|
for device in "${devices[@]}"; do
|
||||||
if [[ ! " ${options[*]} " =~ [[:space:]]${device}[[:space:]] ]]; then
|
if [[ ! " ${options.usbdevices[*]} " =~ [[:space:]]${device}[[:space:]] ]]; then
|
||||||
|
|
||||||
bashio::log.info "Adding to config: ${device}"
|
bashio::log.info "Adding to config: ${device}"
|
||||||
|
|
||||||
new_options=$(echo $options | jq -n --arg device "$device" '.usbdevices |= . + [{ device: ($device), use: false }]')
|
new_options=$(echo $options | jq -n --arg device "$device" '.usbdevices |= . + [{ device: ($device), use: false }]')
|
||||||
bashio::log.info "New options: ${new_options}"
|
bashio::log.info "New options: ${new_options}"
|
||||||
payload=$(bashio::var.json options "^${new_options}")
|
payload=$(bashio::var.json options "^${new_options}")
|
||||||
|
bashio::log.info "Payload: ${payload}"
|
||||||
bashio::api.supervisor POST "/addons/self/options" "${payload}"
|
bashio::api.supervisor POST "/addons/self/options" "${payload}"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user