summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostiantyn Bushko <kbushko@intellias.com>2020-01-14 15:07:28 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2020-01-15 12:23:18 +0100
commitd209a7d077824795a08933214567ba4db0e8391c (patch)
treef37f36f6066a4de1942cdd2ee8202cae4b9736f3
parent484a2d16005ff74563f894552c4f7c0e87332cc1 (diff)
downloadmeta-updater-d209a7d077824795a08933214567ba4db0e8391c.tar.gz
zabbix-agent: configuration recipe
Signed-off-by: Kostiantyn Bushko <kbushko@intellias.com>
-rw-r--r--recipes-connectivity/zabbix/zabbix_%.bbappend20
1 files changed, 20 insertions, 0 deletions
diff --git a/recipes-connectivity/zabbix/zabbix_%.bbappend b/recipes-connectivity/zabbix/zabbix_%.bbappend
new file mode 100644
index 0000000..c6a69b5
--- /dev/null
+++ b/recipes-connectivity/zabbix/zabbix_%.bbappend
@@ -0,0 +1,20 @@
1
2do_install_append() {
3
4 # Set the zabbix Server
5 if [ ! -z ${SOTA_COMM_CONF_ZABBIX_SERVER} ]; then
6 sed -i "s/Server=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/Server=${SOTA_COMM_CONF_ZABBIX_SERVER}/g" ${D}${sysconfdir}/zabbix_agentd.conf
7 if ! grep -Fxq "Server=${SOTA_COMM_CONF_ZABBIX_SERVER}" ${D}${sysconfdir}/zabbix_agentd.conf; then
8 echo -e '\nServer='${SOTA_COMM_CONF_ZABBIX_SERVER} >> ${D}${sysconfdir}/zabbix_agentd.conf
9 fi
10 fi
11
12 # Set ServerActive
13 if [ ! -z ${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE} ]; then
14 sed -i "s/ServerActive=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/ServerActive=${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE}/g" ${D}${sysconfdir}/zabbix_agentd.conf
15 if ! grep -Fxq "ServerActive=${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE}" ${D}${sysconfdir}/zabbix_agentd.conf; then
16 echo -e '\nServerActive='${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE} >> ${D}${sysconfdir}/zabbix_agentd.conf
17 fi
18
19 fi
20}