From a36901223615939eb048a694cb583c2b278d9984 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Tue, 19 Mar 2019 22:05:09 +0100 Subject: [PATCH] optional custom config --- zabbix-agent/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zabbix-agent/run.sh b/zabbix-agent/run.sh index 29ea7a2..4370f7c 100644 --- a/zabbix-agent/run.sh +++ b/zabbix-agent/run.sh @@ -7,12 +7,16 @@ CUSTOM_CFG_PATH=/config/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 +fi + echo " Server=$SERVER ServerActive=$SERVER Hostname=$HOSTNAME LogType=console -Include=/config/zabbix-agent/*.conf +Include=/data/zabbix-agent/*.conf " > /etc/zabbix/zabbix_agentd.conf sudo -u zabbix zabbix_agentd -f