From 68f1c026b6ed2db84ea3d71d9ba8af391b493d4e Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Wed, 20 Mar 2019 09:13:18 +0100 Subject: [PATCH] custom config path --- zabbix-agent/run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zabbix-agent/run.sh b/zabbix-agent/run.sh index 4370f7c..0d1d379 100644 --- a/zabbix-agent/run.sh +++ b/zabbix-agent/run.sh @@ -2,13 +2,13 @@ set -e CONFIG_PATH=/data/options.json -CUSTOM_CFG_PATH=/config/zabbix-agent +CUSTOM_CFG_PATH=/data/zabbix-agent SERVER=$(jq --raw-output ".server" $CONFIG_PATH) HOSTNAME=$(jq --raw-output ".hostname" $CONFIG_PATH) -if [ ! -d /data/zabbix-agent ] ; then - mkdir /data/zabbix-agent +if [ ! -d "$CUSTOM_CFG_PATH" ] ; then + mkdir -p "$CUSTOM_CFG_PATH" fi echo " @@ -16,7 +16,7 @@ Server=$SERVER ServerActive=$SERVER Hostname=$HOSTNAME LogType=console -Include=/data/zabbix-agent/*.conf +Include=${CUSTOM_CFG_PATH}/*.conf " > /etc/zabbix/zabbix_agentd.conf sudo -u zabbix zabbix_agentd -f