diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-02-29 18:01:47 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-02-29 18:01:47 +0000 |
commit | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (patch) | |
tree | 9f47ee47c31a0f13f9496879cd88a1042550aa81 /net-analyzer/zabbix/files/zabbix-jmx-proxy.init | |
parent | 53cba99042fa967e2a93da9f8db806fe2d035543 (diff) |
gentoo (leap year) resync : 29.02.2020
Diffstat (limited to 'net-analyzer/zabbix/files/zabbix-jmx-proxy.init')
-rw-r--r-- | net-analyzer/zabbix/files/zabbix-jmx-proxy.init | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net-analyzer/zabbix/files/zabbix-jmx-proxy.init b/net-analyzer/zabbix/files/zabbix-jmx-proxy.init new file mode 100644 index 000000000000..5722814173e8 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-jmx-proxy.init @@ -0,0 +1,33 @@ +#!/sbin/openrc-run + +LISTEN_IP=${LISTEN_IP:-127.0.0.1} +LISTEN_PORT=${LISTEN_PORT:-10052} +START_POLLERS=${START_POLLERS:-5} +TIMEOUT=${TIMEOUT:-3} + +PID_FILE="/run/zabbix-jmx-proxy" + + +start() { + ZABBIX_OPTIONS="-Dzabbix.pidFile=$PID_FILE \ + -Dzabbix.listenIP=$LISTEN_IP \ + -Dzabbix.listenPort=$LISTEN_PORT \ + -Dzabbix.startPollers=$START_POLLERS \ + -Dzabbix.timeout=$TIMEOUT \ + -Dsun.rmi.transport.tcp.responseTimeout=${TIMEOUT}000" + + JAVA_OPTIONS="-server $JAVA_OPTIONS -Dlogback.configurationFile=logback-console.xml" + + cd /opt/zabbix_java + + CLASSPATH="lib" + for jar in lib/*.jar bin/*.jar; do + CLASSPATH="$CLASSPATH:$jar" + done + + start-stop-daemon -m --background --pidfile $PID_FILE -- java $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway +} + +stop() { + start-stop-daemon --stop --pidfile $PID_FILE +} |