optional custom config
This commit is contained in:
parent
b46b881006
commit
a369012236
@ -7,12 +7,16 @@ CUSTOM_CFG_PATH=/config/zabbix-agent
|
|||||||
SERVER=$(jq --raw-output ".server" $CONFIG_PATH)
|
SERVER=$(jq --raw-output ".server" $CONFIG_PATH)
|
||||||
HOSTNAME=$(jq --raw-output ".hostname" $CONFIG_PATH)
|
HOSTNAME=$(jq --raw-output ".hostname" $CONFIG_PATH)
|
||||||
|
|
||||||
|
if [ ! -d /data/zabbix-agent ] ; then
|
||||||
|
mkdir /data/zabbix-agent
|
||||||
|
fi
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
Server=$SERVER
|
Server=$SERVER
|
||||||
ServerActive=$SERVER
|
ServerActive=$SERVER
|
||||||
Hostname=$HOSTNAME
|
Hostname=$HOSTNAME
|
||||||
LogType=console
|
LogType=console
|
||||||
Include=/config/zabbix-agent/*.conf
|
Include=/data/zabbix-agent/*.conf
|
||||||
" > /etc/zabbix/zabbix_agentd.conf
|
" > /etc/zabbix/zabbix_agentd.conf
|
||||||
|
|
||||||
sudo -u zabbix zabbix_agentd -f
|
sudo -u zabbix zabbix_agentd -f
|
||||||
|
Loading…
Reference in New Issue
Block a user