mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-04-14 14:28:27 +02:00
Fping location by env variable
This commit is contained in:
parent
2428495624
commit
9f333cd998
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||
|
@ -92,16 +92,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -460,8 +464,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||
|
@ -92,16 +92,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -457,8 +461,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED=""\
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||
|
@ -92,16 +92,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -457,8 +461,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -16,7 +16,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL description="Zabbix proxy with MySQL database support" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
|
@ -92,16 +92,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -457,8 +461,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/bin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with MySQL database support" \
|
||||
|
@ -92,16 +92,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -457,8 +461,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
||||
|
@ -58,16 +58,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -226,8 +230,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
||||
|
@ -58,16 +58,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -226,8 +230,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
||||
|
@ -58,16 +58,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -226,8 +230,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -16,7 +16,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL description="Zabbix proxy with SQLite3 database support" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
|
@ -58,16 +58,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -226,8 +230,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/bin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix proxy with SQLite3 database support" \
|
||||
|
@ -58,16 +58,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -226,8 +230,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts"
|
||||
update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts"
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
||||
|
@ -87,16 +87,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -472,8 +476,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
||||
|
@ -87,16 +87,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -469,8 +473,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED=""\
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
||||
|
@ -469,8 +469,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -16,7 +16,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL description="Zabbix server with MySQL database support" \
|
||||
maintainer="alexey.pustovalov@zabbix.com" \
|
||||
|
@ -87,16 +87,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -469,8 +473,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/bin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with MySQL database support" \
|
||||
|
@ -87,16 +87,20 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -469,8 +473,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
|
||||
|
@ -87,20 +87,16 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -502,8 +498,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
|
||||
|
@ -87,20 +87,16 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -502,8 +498,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED=""\
|
||||
ZBX_FPINGLOCATION="/usr/sbin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.title="Zabbix server (PostgreSQL)" \
|
||||
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
|
@ -502,8 +502,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
@ -14,7 +14,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
||||
ENV TERM=xterm \
|
||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||
NMAP_PRIVILEGED=""
|
||||
NMAP_PRIVILEGED="" \
|
||||
ZBX_FPINGLOCATION="/usr/bin/fping"
|
||||
|
||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||
org.opencontainers.image.description="Zabbix server with PostgreSQL database support" \
|
||||
|
@ -87,20 +87,16 @@ update_config_var() {
|
||||
echo -n "** Updating '$config_path' parameter \"$var_name\": '$var_value'..."
|
||||
fi
|
||||
|
||||
# Remove configuration parameter definition in case of unset or empty parameter value
|
||||
# Remove configuration parameter definition in case of unset parameter value
|
||||
if [ -z "$var_value" ]; then
|
||||
sed -i -e "/^$var_name=/d" "$config_path"
|
||||
echo "removed"
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove value from configuration parameter in case of set to double quoted parameter value
|
||||
if [[ "$var_value" == '""' ]]; then
|
||||
if [ "$(grep -E "^$var_name=" $config_path)" ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
else
|
||||
sed -i -e "/^[#;] $var_name=/s/.*/&\n$var_name=/" "$config_path"
|
||||
fi
|
||||
# Remove value from configuration parameter in case of double quoted parameter value
|
||||
if [ "$var_value" == '""' ]; then
|
||||
sed -i -e "/^$var_name=/s/=.*/=/" "$config_path"
|
||||
echo "undefined"
|
||||
return
|
||||
fi
|
||||
@ -502,8 +498,8 @@ update_zbx_config() {
|
||||
update_config_var $ZBX_CONFIG "ExportType" "${ZBX_EXPORTTYPE}"
|
||||
fi
|
||||
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location"
|
||||
update_config_var $ZBX_CONFIG "FpingLocation" "${ZBX_FPINGLOCATION}"
|
||||
update_config_var $ZBX_CONFIG "Fping6Location" '""'
|
||||
|
||||
update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys"
|
||||
update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}"
|
||||
|
Loading…
Reference in New Issue
Block a user