diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 648f3da..dd7fc67 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -8,6 +8,6 @@ COPY rootfs / RUN apk add -U zabbix-agent2=6.0.5-r0 sudo LABEL \ - io.hass.version="0.2.1" \ + io.hass.version="0.2.2" \ io.hass.type="addon" \ io.hass.arch="amd64" \ No newline at end of file diff --git a/Dockerfile.arm b/Dockerfile.arm index c6c1194..81fc09c 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -8,6 +8,6 @@ COPY rootfs / RUN apk add -U zabbix-agent2=6.0.5-r0 sudo LABEL \ - io.hass.version="0.2.1" \ + io.hass.version="0.2.2" \ io.hass.type="addon" \ io.hass.arch="armhf" \ No newline at end of file diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 6218544..74772b5 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -8,6 +8,6 @@ COPY rootfs / RUN apk add -U zabbix-agent2=6.0.5-r0 sudo LABEL \ - io.hass.version="0.2.1" \ + io.hass.version="0.2.2" \ io.hass.type="addon" \ io.hass.arch="aarch64" \ No newline at end of file diff --git a/config.json b/config.json index 9e9996e..373b36a 100644 --- a/config.json +++ b/config.json @@ -2,7 +2,7 @@ "name": "Zabbix Agent 2", "url": "https://git.asperti.com/paspo/hassio-addons", "image": "docker.asperti.com/paspo/hassio-zabbix-agent2", - "version": "0.2.1", + "version": "0.2.2", "slug": "zabbix-agent2", "description": "Zabbix Agent 2 for hass.io", "startup": "services", diff --git a/rootfs/etc/services.d/zabbix-agent2/run b/rootfs/etc/services.d/zabbix-agent2/run index ef4709d..c614a56 100755 --- a/rootfs/etc/services.d/zabbix-agent2/run +++ b/rootfs/etc/services.d/zabbix-agent2/run @@ -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"