fix bashio api access
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2022-06-13 11:07:20 +02:00
parent c2eef2b279
commit 46c224cd9f
5 changed files with 9 additions and 6 deletions

View File

@@ -5,10 +5,13 @@
set -e
CONFIG_PATH=/data/options.json
CUSTOM_CFG_PATH=/share/zabbix-agent2
SERVER="$(bashio::config 'server')"
HOSTNAME="$(bashio::config 'hostname')"
SERVER_OLD=$(jq --raw-output ".server" $CONFIG_PATH)
SERVER="$(bashio::config 'server' $SERVER_OLD)"
HOSTNAME_OLD=$(jq --raw-output ".hostname" $CONFIG_PATH)
HOSTNAME="$(bashio::config 'hostname' $HOSTNAME_OLD)"
if [ ! -d "$CUSTOM_CFG_PATH" ] ; then
bashio::log.info "Creating a folder for custom configuration"