custom config path
This commit is contained in:
parent
b9a64e91f9
commit
68f1c026b6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user