1
0
mirror of https://github.com/zabbix/zabbix-docker.git synced 2024-12-23 14:59:00 +01:00
zabbix-docker/zabbix-appliance/rhel/conf/usr/sbin/zabbix_java_gateway
2018-05-09 00:25:00 +03:00

28 lines
803 B
Plaintext
Executable File

JAVA=${JAVA:-"/usr/bin/java"}
DAEMON=${DAEMON:-"/usr/sbin/zabbix_java"}
JAVA_OPTIONS="-server $JAVA_OPTIONS"
JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml"
cd $DAEMON
CLASSPATH="$DAEMON/lib"
for jar in `find lib bin -name "*.jar"`; do
if [ $jar != *junit* ]; then
CLASSPATH="$CLASSPATH:$DAEMON/$jar"
fi
done
ZABBIX_OPTIONS=""
if [ -n "$ZBX_START_POLLERS" ]; then
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$ZBX_START_POLLERS"
fi
if [ -n "$ZBX_TIMEOUT" ]; then
ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$ZBX_TIMEOUT -Dsun.rmi.transport.tcp.responseTimeout=${ZBX_TIMEOUT}000"
fi
COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway"
exec $COMMAND_LINE