This commit is contained in:
Hans Karlinius
2024-11-29 04:20:39 +01:00
parent c4eb883aba
commit c94f8fda2f
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: VirtualHere Client name: VirtualHere Client
version: "0.1.212" version: "0.1.213"
slug: vhclient slug: vhclient
description: VirtualHere Client description: VirtualHere Client
arch: arch:
@@ -1,6 +1,6 @@
#!/command/with-contenv bashio #!/command/with-contenv bashio
sleep 5s #sleep 5s
if bashio::config.has_value 'autofind'; then if bashio::config.has_value 'autofind'; then
autofind=($(bashio::config 'autofind')) autofind=($(bashio::config 'autofind'))
@@ -13,14 +13,15 @@ set -x
#my_array+=({ 'name': 'one', 'use': false}) # Add a new item to the array #my_array+=({ 'name': 'one', 'use': false}) # Add a new item to the array
#bashio::config::update 'my_array' "${my_array[@]}" #bashio::config::update 'my_array' "${my_array[@]}"
list1=$(/usr/bin/vhclient -t LIST) #list1=$(/usr/bin/vhclient -t LIST)
#list2=$(eval 'grep "--" <<< "$list1"') #list2=$(eval 'grep "--" <<< "$list1"')
bashio::log.info "${list1}" #bashio::log.info "${list1}"
#bashio::log.info "${list2}" #bashio::log.info "${list2}"
options=$(bashio::addon.options)
mapfile -t devices < <(/usr/bin/vhclient -t LIST) mapfile -t devices < <(/usr/bin/vhclient -t LIST)
for device in "${devices[@]}"; do for device in "${devices[@]}"; do
if [[ "$device" =~ .*"-->".* ]]; then if [[ "$device" =~ .*-->.* ]]; then
bashio::log.info "${device}" bashio::log.info "${device}"
fi fi
done done