diff options
| author | Kostiantyn Bushko <kbushko@intellias.com> | 2020-01-14 15:07:28 +0200 |
|---|---|---|
| committer | Kostiantyn Bushko <kbushko@intellias.com> | 2020-01-14 15:07:28 +0200 |
| commit | 4327bd4133f0250a3babebd2e051d792550ac22a (patch) | |
| tree | b851e32aa5113c299ed20b6c19504fe135a2a1fc | |
| parent | e898fd0fb9ffe556c421ace92dd6fe654064f14e (diff) | |
| download | meta-updater-4327bd4133f0250a3babebd2e051d792550ac22a.tar.gz | |
zabbix-agent: configuration recipefeat/OTA-2150/system_monitoring
Signed-off-by: Kostiantyn Bushko <kbushko@intellias.com>
| -rw-r--r-- | recipes-connectivity/zabbix/zabbix_%.bbappend | 20 |
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 | |||
| 2 | do_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 | } | ||
