zabbix-docker/zabbix-appliance/rhel/conf/usr/sbin/zabbix_java_gateway

36 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-06-11 23:07:45 +02:00
2018-05-08 23:25:00 +02:00
JAVA=${JAVA:-"/usr/bin/java"}
JAVA_OPTIONS="-server $JAVA_OPTIONS"
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
2021-06-11 23:07:45 +02:00
cd /usr/sbin/zabbix_java
2018-05-08 23:25:00 +02:00
2021-06-11 23:07:45 +02:00
CLASSPATH="lib"
2020-08-27 20:05:12 +02:00
for jar in `find lib bin ext_lib -name "*.jar"`; do
2021-06-11 23:07:45 +02:00
CLASSPATH="$CLASSPATH:$jar"
2018-05-08 23:25:00 +02:00
done
2021-06-11 23:07:45 +02:00
if [ -n "$ZBX_LISTEN_IP" ]; then
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenIP=$ZBX_LISTEN_IP"
fi
if [ -n "$ZBX_LISTEN_PORT" ]; then
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenPort=$ZBX_LISTEN_PORT"
fi
2018-05-08 23:25:00 +02:00
if [ -n "$ZBX_START_POLLERS" ]; then
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$ZBX_START_POLLERS"
fi
if [ -n "$ZBX_TIMEOUT" ]; then
2021-06-11 23:07:45 +02:00
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT"
fi
if [ -n "$ZBX_PROPERTIES_FILE" ]; then
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.propertiesFile=$ZBX_PROPERTIES_FILE"
2018-05-08 23:25:00 +02:00
fi
2021-06-11 23:07:45 +02:00
tcp_timeout=${ZBX_TIMEOUT:=3}000
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dsun.rmi.transport.tcp.responseTimeout=$tcp_timeout"
2018-05-08 23:25:00 +02:00
COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway"
exec $COMMAND_LINE