From 78714133bb3a01b440f02a5affadeb313fa21f30 Mon Sep 17 00:00:00 2001 From: dotneft Date: Mon, 24 Oct 2016 04:41:00 -0700 Subject: [PATCH] Fixed fping location on different images --- agent/alpine/run_zabbix_component.sh | 15 +++++++++++++-- agent/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- java-gateway/alpine/run_zabbix_component.sh | 15 +++++++++++++-- java-gateway/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- proxy-mysql/alpine/Dockerfile | 2 -- proxy-mysql/alpine/run_zabbix_component.sh | 15 +++++++++++++-- proxy-mysql/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- proxy-sqlite3/alpine/Dockerfile | 2 -- proxy-sqlite3/alpine/run_zabbix_component.sh | 15 +++++++++++++-- proxy-sqlite3/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- server-mysql/alpine/Dockerfile | 2 -- server-mysql/alpine/run_zabbix_component.sh | 15 +++++++++++++-- server-mysql/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- server-pgsql/alpine/Dockerfile | 2 -- server-pgsql/alpine/run_zabbix_component.sh | 15 +++++++++++++-- server-pgsql/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- web-apache-mysql/alpine/run_zabbix_component.sh | 15 +++++++++++++-- web-apache-mysql/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- web-nginx-mysql/alpine/run_zabbix_component.sh | 15 +++++++++++++-- web-nginx-mysql/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- web-nginx-pgsql/alpine/run_zabbix_component.sh | 15 +++++++++++++-- web-nginx-pgsql/ubuntu/run_zabbix_component.sh | 15 +++++++++++++-- 22 files changed, 234 insertions(+), 44 deletions(-) diff --git a/agent/alpine/run_zabbix_component.sh b/agent/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/agent/alpine/run_zabbix_component.sh +++ b/agent/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/agent/ubuntu/run_zabbix_component.sh b/agent/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/agent/ubuntu/run_zabbix_component.sh +++ b/agent/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/java-gateway/alpine/run_zabbix_component.sh b/java-gateway/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/java-gateway/alpine/run_zabbix_component.sh +++ b/java-gateway/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/java-gateway/ubuntu/run_zabbix_component.sh b/java-gateway/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/java-gateway/ubuntu/run_zabbix_component.sh +++ b/java-gateway/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile index 7a2757ddf..66b528579 100644 --- a/proxy-mysql/alpine/Dockerfile +++ b/proxy-mysql/alpine/Dockerfile @@ -90,8 +90,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \ cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_proxy.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_proxy.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cp database/${DB_TYPE}/schema.sql /usr/share/doc/zabbix-proxy-${DB_TYPE}/ && \ cd /tmp/ && \ diff --git a/proxy-mysql/alpine/run_zabbix_component.sh b/proxy-mysql/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/proxy-mysql/alpine/run_zabbix_component.sh +++ b/proxy-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/proxy-mysql/ubuntu/run_zabbix_component.sh b/proxy-mysql/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/proxy-mysql/ubuntu/run_zabbix_component.sh +++ b/proxy-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index 9e4736fd3..c0b5a1987 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -86,8 +86,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \ cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_proxy.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_proxy.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cd /tmp/ && \ rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \ diff --git a/proxy-sqlite3/alpine/run_zabbix_component.sh b/proxy-sqlite3/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/proxy-sqlite3/alpine/run_zabbix_component.sh +++ b/proxy-sqlite3/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/proxy-sqlite3/ubuntu/run_zabbix_component.sh b/proxy-sqlite3/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/proxy-sqlite3/ubuntu/run_zabbix_component.sh +++ b/proxy-sqlite3/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/server-mysql/alpine/Dockerfile b/server-mysql/alpine/Dockerfile index 5a3288d44..2c2b966d9 100644 --- a/server-mysql/alpine/Dockerfile +++ b/server-mysql/alpine/Dockerfile @@ -91,8 +91,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \ cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_server.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_server.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cp database/${DB_TYPE}/schema.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ cp database/${DB_TYPE}/images.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ diff --git a/server-mysql/alpine/run_zabbix_component.sh b/server-mysql/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/server-mysql/alpine/run_zabbix_component.sh +++ b/server-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/server-mysql/ubuntu/run_zabbix_component.sh b/server-mysql/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/server-mysql/ubuntu/run_zabbix_component.sh +++ b/server-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/server-pgsql/alpine/Dockerfile b/server-pgsql/alpine/Dockerfile index 5b3b674f2..e37df5440 100644 --- a/server-pgsql/alpine/Dockerfile +++ b/server-pgsql/alpine/Dockerfile @@ -91,8 +91,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \ cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_server.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_server.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cp database/${DB_TYPE}/schema.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ cp database/${DB_TYPE}/images.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ diff --git a/server-pgsql/alpine/run_zabbix_component.sh b/server-pgsql/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/server-pgsql/alpine/run_zabbix_component.sh +++ b/server-pgsql/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/server-pgsql/ubuntu/run_zabbix_component.sh b/server-pgsql/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/server-pgsql/ubuntu/run_zabbix_component.sh +++ b/server-pgsql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/web-apache-mysql/alpine/run_zabbix_component.sh b/web-apache-mysql/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/web-apache-mysql/alpine/run_zabbix_component.sh +++ b/web-apache-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/web-apache-mysql/ubuntu/run_zabbix_component.sh b/web-apache-mysql/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/web-apache-mysql/ubuntu/run_zabbix_component.sh +++ b/web-apache-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/web-nginx-mysql/alpine/run_zabbix_component.sh b/web-nginx-mysql/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/web-nginx-mysql/alpine/run_zabbix_component.sh +++ b/web-nginx-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/web-nginx-mysql/ubuntu/run_zabbix_component.sh b/web-nginx-mysql/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/web-nginx-mysql/ubuntu/run_zabbix_component.sh +++ b/web-nginx-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/web-nginx-pgsql/alpine/run_zabbix_component.sh b/web-nginx-pgsql/alpine/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/web-nginx-pgsql/alpine/run_zabbix_component.sh +++ b/web-nginx-pgsql/alpine/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" diff --git a/web-nginx-pgsql/ubuntu/run_zabbix_component.sh b/web-nginx-pgsql/ubuntu/run_zabbix_component.sh index 9f855f685..1960ced30 100755 --- a/web-nginx-pgsql/ubuntu/run_zabbix_component.sh +++ b/web-nginx-pgsql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,19 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"