Skip to content

Commit

Permalink
Ignore case for boolean vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Apr 12, 2021
1 parent fe57f5c commit d4bae35
Show file tree
Hide file tree
Showing 30 changed files with 168 additions and 144 deletions.
6 changes: 3 additions & 3 deletions agent/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -134,7 +134,7 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"

: ${ZBX_PASSIVE_ALLOW:="true"}
if [ "$ZBX_PASSIVE_ALLOW" == "true" ]; then
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ]; then
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
update_config_var $ZBX_AGENT_CONFIG "Server" "${ZBX_PASSIVESERVERS}"
else
Expand All @@ -146,7 +146,7 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "StartAgents" "${ZBX_STARTAGENTS}"

: ${ZBX_ACTIVE_ALLOW:="true"}
if [ "$ZBX_ACTIVE_ALLOW" == "true" ]; then
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ]; then
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
update_config_var $ZBX_AGENT_CONFIG "ServerActive" "${ZBX_ACTIVESERVERS}"
else
Expand Down
6 changes: 3 additions & 3 deletions agent/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -134,7 +134,7 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"

: ${ZBX_PASSIVE_ALLOW:="true"}
if [ "$ZBX_PASSIVE_ALLOW" == "true" ]; then
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ]; then
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
update_config_var $ZBX_AGENT_CONFIG "Server" "${ZBX_PASSIVESERVERS}"
else
Expand All @@ -146,7 +146,7 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "StartAgents" "${ZBX_STARTAGENTS}"

: ${ZBX_ACTIVE_ALLOW:="true"}
if [ "$ZBX_ACTIVE_ALLOW" == "true" ]; then
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ]; then
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
update_config_var $ZBX_AGENT_CONFIG "ServerActive" "${ZBX_ACTIVESERVERS}"
else
Expand Down
6 changes: 3 additions & 3 deletions agent/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -134,7 +134,7 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"

: ${ZBX_PASSIVE_ALLOW:="true"}
if [ "$ZBX_PASSIVE_ALLOW" == "true" ]; then
if [ "${ZBX_PASSIVE_ALLOW,,}" == "true" ]; then
echo "** Using '$ZBX_PASSIVESERVERS' servers for passive checks"
update_config_var $ZBX_AGENT_CONFIG "Server" "${ZBX_PASSIVESERVERS}"
else
Expand All @@ -146,7 +146,7 @@ prepare_zbx_agent_config() {
update_config_var $ZBX_AGENT_CONFIG "StartAgents" "${ZBX_STARTAGENTS}"

: ${ZBX_ACTIVE_ALLOW:="true"}
if [ "$ZBX_ACTIVE_ALLOW" == "true" ]; then
if [ "${ZBX_ACTIVE_ALLOW,,}" == "true" ]; then
echo "** Using '$ZBX_ACTIVESERVERS' servers for active checks"
update_config_var $ZBX_AGENT_CONFIG "ServerActive" "${ZBX_ACTIVESERVERS}"
else
Expand Down
2 changes: 1 addition & 1 deletion java-gateway/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down
2 changes: 1 addition & 1 deletion java-gateway/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down
2 changes: 1 addition & 1 deletion java-gateway/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down
16 changes: 8 additions & 8 deletions proxy-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -150,17 +150,17 @@ check_variables_mysql() {

file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD}" == "true" ]; then
if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
echo "**** Impossible to use MySQL server because of unknown Zabbix user and random 'root' password"
exit 1
fi

if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD}" != "true" ]; then
if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" != "true" ]; then
echo "*** Impossible to use MySQL server because 'root' password is not defined and it is not empty"
exit 1
fi

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
Expand All @@ -170,7 +170,7 @@ check_variables_mysql() {

# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
DB_SERVER_ZBX_USER=${MYSQL_USER:-"zabbix"}
DB_SERVER_ZBX_PASS=${MYSQL_PASSWORD:-"zabbix"}

Expand All @@ -182,7 +182,7 @@ check_db_connect_mysql() {
echo "* DB_SERVER_HOST: ${DB_SERVER_HOST}"
echo "* DB_SERVER_PORT: ${DB_SERVER_PORT}"
echo "* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}"
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
if [ "${USE_DB_ROOT_USER}" == "true" ]; then
echo "* DB_SERVER_ROOT_USER: ${DB_SERVER_ROOT_USER}"
echo "* DB_SERVER_ROOT_PASS: ${DB_SERVER_ROOT_PASS}"
Expand Down Expand Up @@ -321,7 +321,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "StartHTTPPollers" "${ZBX_STARTHTTPPOLLERS}"

: ${ZBX_JAVAGATEWAY_ENABLE:="false"}
if [ "${ZBX_JAVAGATEWAY_ENABLE}" == "true" ]; then
if [ "${ZBX_JAVAGATEWAY_ENABLE,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "JavaGateway" "${ZBX_JAVAGATEWAY:-"zabbix-java-gateway"}"
update_config_var $ZBX_CONFIG "JavaGatewayPort" "${ZBX_JAVAGATEWAYPORT}"
update_config_var $ZBX_CONFIG "StartJavaPollers" "${ZBX_STARTJAVAPOLLERS:-"5"}"
Expand All @@ -338,7 +338,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "VMwareTimeout" "${ZBX_VMWARETIMEOUT}"

: ${ZBX_ENABLE_SNMP_TRAPS:="false"}
if [ "${ZBX_ENABLE_SNMP_TRAPS}" == "true" ]; then
if [ "${ZBX_ENABLE_SNMP_TRAPS,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "SNMPTrapperFile" "${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
update_config_var $ZBX_CONFIG "StartSNMPTrapper" "1"
else
Expand Down
16 changes: 8 additions & 8 deletions proxy-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -150,17 +150,17 @@ check_variables_mysql() {

file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD}" == "true" ]; then
if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
echo "**** Impossible to use MySQL server because of unknown Zabbix user and random 'root' password"
exit 1
fi

if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD}" != "true" ]; then
if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" != "true" ]; then
echo "*** Impossible to use MySQL server because 'root' password is not defined and it is not empty"
exit 1
fi

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
Expand All @@ -170,7 +170,7 @@ check_variables_mysql() {

# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
DB_SERVER_ZBX_USER=${MYSQL_USER:-"zabbix"}
DB_SERVER_ZBX_PASS=${MYSQL_PASSWORD:-"zabbix"}

Expand All @@ -182,7 +182,7 @@ check_db_connect_mysql() {
echo "* DB_SERVER_HOST: ${DB_SERVER_HOST}"
echo "* DB_SERVER_PORT: ${DB_SERVER_PORT}"
echo "* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}"
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
if [ "${USE_DB_ROOT_USER}" == "true" ]; then
echo "* DB_SERVER_ROOT_USER: ${DB_SERVER_ROOT_USER}"
echo "* DB_SERVER_ROOT_PASS: ${DB_SERVER_ROOT_PASS}"
Expand Down Expand Up @@ -321,7 +321,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "StartHTTPPollers" "${ZBX_STARTHTTPPOLLERS}"

: ${ZBX_JAVAGATEWAY_ENABLE:="false"}
if [ "${ZBX_JAVAGATEWAY_ENABLE}" == "true" ]; then
if [ "${ZBX_JAVAGATEWAY_ENABLE,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "JavaGateway" "${ZBX_JAVAGATEWAY:-"zabbix-java-gateway"}"
update_config_var $ZBX_CONFIG "JavaGatewayPort" "${ZBX_JAVAGATEWAYPORT}"
update_config_var $ZBX_CONFIG "StartJavaPollers" "${ZBX_STARTJAVAPOLLERS:-"5"}"
Expand All @@ -338,7 +338,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "VMwareTimeout" "${ZBX_VMWARETIMEOUT}"

: ${ZBX_ENABLE_SNMP_TRAPS:="false"}
if [ "${ZBX_ENABLE_SNMP_TRAPS}" == "true" ]; then
if [ "${ZBX_ENABLE_SNMP_TRAPS,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "SNMPTrapperFile" "${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
update_config_var $ZBX_CONFIG "StartSNMPTrapper" "1"
else
Expand Down
16 changes: 8 additions & 8 deletions proxy-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -150,17 +150,17 @@ check_variables_mysql() {

file_env MYSQL_ROOT_PASSWORD

if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD}" == "true" ]; then
if [ ! -n "${MYSQL_USER}" ] && [ "${MYSQL_RANDOM_ROOT_PASSWORD,,}" == "true" ]; then
echo "**** Impossible to use MySQL server because of unknown Zabbix user and random 'root' password"
exit 1
fi

if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD}" != "true" ]; then
if [ ! -n "${MYSQL_USER}" ] && [ ! -n "${MYSQL_ROOT_PASSWORD}" ] && [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" != "true" ]; then
echo "*** Impossible to use MySQL server because 'root' password is not defined and it is not empty"
exit 1
fi

if [ "${MYSQL_ALLOW_EMPTY_PASSWORD}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
if [ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || [ -n "${MYSQL_ROOT_PASSWORD}" ]; then
USE_DB_ROOT_USER=true
DB_SERVER_ROOT_USER="root"
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
Expand All @@ -170,7 +170,7 @@ check_variables_mysql() {

# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
[ "${MYSQL_ALLOW_EMPTY_PASSWORD,,}" == "true" ] || DB_SERVER_ROOT_PASS=${DB_SERVER_ROOT_PASS:-${MYSQL_PASSWORD}}
DB_SERVER_ZBX_USER=${MYSQL_USER:-"zabbix"}
DB_SERVER_ZBX_PASS=${MYSQL_PASSWORD:-"zabbix"}

Expand All @@ -182,7 +182,7 @@ check_db_connect_mysql() {
echo "* DB_SERVER_HOST: ${DB_SERVER_HOST}"
echo "* DB_SERVER_PORT: ${DB_SERVER_PORT}"
echo "* DB_SERVER_DBNAME: ${DB_SERVER_DBNAME}"
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
if [ "${USE_DB_ROOT_USER}" == "true" ]; then
echo "* DB_SERVER_ROOT_USER: ${DB_SERVER_ROOT_USER}"
echo "* DB_SERVER_ROOT_PASS: ${DB_SERVER_ROOT_PASS}"
Expand Down Expand Up @@ -321,7 +321,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "StartHTTPPollers" "${ZBX_STARTHTTPPOLLERS}"

: ${ZBX_JAVAGATEWAY_ENABLE:="false"}
if [ "${ZBX_JAVAGATEWAY_ENABLE}" == "true" ]; then
if [ "${ZBX_JAVAGATEWAY_ENABLE,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "JavaGateway" "${ZBX_JAVAGATEWAY:-"zabbix-java-gateway"}"
update_config_var $ZBX_CONFIG "JavaGatewayPort" "${ZBX_JAVAGATEWAYPORT}"
update_config_var $ZBX_CONFIG "StartJavaPollers" "${ZBX_STARTJAVAPOLLERS:-"5"}"
Expand All @@ -338,7 +338,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "VMwareTimeout" "${ZBX_VMWARETIMEOUT}"

: ${ZBX_ENABLE_SNMP_TRAPS:="false"}
if [ "${ZBX_ENABLE_SNMP_TRAPS}" == "true" ]; then
if [ "${ZBX_ENABLE_SNMP_TRAPS,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "SNMPTrapperFile" "${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
update_config_var $ZBX_CONFIG "StartSNMPTrapper" "1"
else
Expand Down
6 changes: 3 additions & 3 deletions proxy-sqlite3/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -158,7 +158,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "StartHTTPPollers" "${ZBX_STARTHTTPPOLLERS}"

: ${ZBX_JAVAGATEWAY_ENABLE:="false"}
if [ "${ZBX_JAVAGATEWAY_ENABLE}" == "true" ]; then
if [ "${ZBX_JAVAGATEWAY_ENABLE,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "JavaGateway" "${ZBX_JAVAGATEWAY:-"zabbix-java-gateway"}"
update_config_var $ZBX_CONFIG "JavaGatewayPort" "${ZBX_JAVAGATEWAYPORT}"
update_config_var $ZBX_CONFIG "StartJavaPollers" "${ZBX_STARTJAVAPOLLERS:-"5"}"
Expand All @@ -175,7 +175,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "VMwareTimeout" "${ZBX_VMWARETIMEOUT}"

: ${ZBX_ENABLE_SNMP_TRAPS:="false"}
if [ "${ZBX_ENABLE_SNMP_TRAPS}" == "true" ]; then
if [ "${ZBX_ENABLE_SNMP_TRAPS,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "SNMPTrapperFile" "${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
update_config_var $ZBX_CONFIG "StartSNMPTrapper" "1"
else
Expand Down
6 changes: 3 additions & 3 deletions proxy-sqlite3/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -158,7 +158,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "StartHTTPPollers" "${ZBX_STARTHTTPPOLLERS}"

: ${ZBX_JAVAGATEWAY_ENABLE:="false"}
if [ "${ZBX_JAVAGATEWAY_ENABLE}" == "true" ]; then
if [ "${ZBX_JAVAGATEWAY_ENABLE,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "JavaGateway" "${ZBX_JAVAGATEWAY:-"zabbix-java-gateway"}"
update_config_var $ZBX_CONFIG "JavaGatewayPort" "${ZBX_JAVAGATEWAYPORT}"
update_config_var $ZBX_CONFIG "StartJavaPollers" "${ZBX_STARTJAVAPOLLERS:-"5"}"
Expand All @@ -175,7 +175,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "VMwareTimeout" "${ZBX_VMWARETIMEOUT}"

: ${ZBX_ENABLE_SNMP_TRAPS:="false"}
if [ "${ZBX_ENABLE_SNMP_TRAPS}" == "true" ]; then
if [ "${ZBX_ENABLE_SNMP_TRAPS,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "SNMPTrapperFile" "${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
update_config_var $ZBX_CONFIG "StartSNMPTrapper" "1"
else
Expand Down
6 changes: 3 additions & 3 deletions proxy-sqlite3/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set +e

# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then
if [ "${DEBUG_MODE,,}" == "true" ]; then
set -o xtrace
fi

Expand Down Expand Up @@ -158,7 +158,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "StartHTTPPollers" "${ZBX_STARTHTTPPOLLERS}"

: ${ZBX_JAVAGATEWAY_ENABLE:="false"}
if [ "${ZBX_JAVAGATEWAY_ENABLE}" == "true" ]; then
if [ "${ZBX_JAVAGATEWAY_ENABLE,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "JavaGateway" "${ZBX_JAVAGATEWAY:-"zabbix-java-gateway"}"
update_config_var $ZBX_CONFIG "JavaGatewayPort" "${ZBX_JAVAGATEWAYPORT}"
update_config_var $ZBX_CONFIG "StartJavaPollers" "${ZBX_STARTJAVAPOLLERS:-"5"}"
Expand All @@ -175,7 +175,7 @@ update_zbx_config() {
update_config_var $ZBX_CONFIG "VMwareTimeout" "${ZBX_VMWARETIMEOUT}"

: ${ZBX_ENABLE_SNMP_TRAPS:="false"}
if [ "${ZBX_ENABLE_SNMP_TRAPS}" == "true" ]; then
if [ "${ZBX_ENABLE_SNMP_TRAPS,,}" == "true" ]; then
update_config_var $ZBX_CONFIG "SNMPTrapperFile" "${ZABBIX_USER_HOME_DIR}/snmptraps/snmptraps.log"
update_config_var $ZBX_CONFIG "StartSNMPTrapper" "1"
else
Expand Down
Loading

0 comments on commit d4bae35

Please sign in to comment.