From f133b1cc220060c2df54a4b1f99fd24fcfde8b8b Mon Sep 17 00:00:00 2001 From: Hans Karlinius Date: Thu, 28 Nov 2024 07:39:59 +0100 Subject: [PATCH] test --- vhclient/config.yaml | 2 +- vhclient/rootfs/etc/s6-overlay/s6-rc.d/test/run | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/vhclient/config.yaml b/vhclient/config.yaml index ef638bc..c86ab39 100644 --- a/vhclient/config.yaml +++ b/vhclient/config.yaml @@ -1,5 +1,5 @@ name: VirtualHere Client -version: "0.1.163" +version: "0.1.164" slug: vhclient description: VirtualHere Client arch: diff --git a/vhclient/rootfs/etc/s6-overlay/s6-rc.d/test/run b/vhclient/rootfs/etc/s6-overlay/s6-rc.d/test/run index acb7116..9ad6a34 100755 --- a/vhclient/rootfs/etc/s6-overlay/s6-rc.d/test/run +++ b/vhclient/rootfs/etc/s6-overlay/s6-rc.d/test/run @@ -1,10 +1,10 @@ #!/command/with-contenv bashio set -x -test=($(bashio::config 'test')) -test+=('one', 'two') +#test=($(bashio::config 'test')) +#test+=('one', 'two') #bashio::config::update 'test' "${test[@]}" -bashio::addon.option 'test' $test[@] +#bashio::addon.option 'test' $test[@] #TEST #bashio::addon.option 'usbdevices' { 'name': 'one', 'use': false} @@ -12,3 +12,9 @@ bashio::addon.option 'test' $test[@] #my_array+=('one') # 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[@]}" + +options=$(bashio::addon.options) +new_options=$(echo $options | jq .gurka=false) +payload=$(bashio::var.json options "^${new_options}") +bashio::api.supervisor POST "/addons/self/options" "${payload}" +curl -sH "Authorization: Bearer $SUPERVISOR_TOKEN" http://supervisor/addons/self/info | jq .data.options