2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Plugins jstat__*: simplify handling of environment settings

This commit is contained in:
Lars Kruse 2018-07-04 03:09:45 +02:00
parent 4becc789de
commit 6af31ea318
3 changed files with 9 additions and 51 deletions

View File

@ -35,25 +35,11 @@
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
# javahome - Defaults to '/usr/local/java/jdk'
#
DefaultPidFile="/var/run/jsvc.pid"
DefaultJavaHome="/usr/local/java/jdk"
#
# Environment Variables
#
if [ -z "${pidfilepath}" ]; then
pidfilepath="${DefaultPidFile}"
fi
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
graphtitle=${graphtitle:-$pidfilepath}
JAVA_HOME=${javahome:-/usr/local/java/jdk}
if [ -z "${graphtitle}" ]; then
graphtitle="${pidfilepath}"
fi
if [ -z "${javahome}" ]; then
JAVA_HOME="${DefaultJavaHome}"
else
JAVA_HOME="${javahome}"
fi
export JAVA_HOME
#

View File

@ -35,25 +35,11 @@
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
# javahome - Defaults to '/usr/local/java/jdk'
#
DefaultPidFile="/var/run/jsvc.pid"
DefaultJavaHome="/usr/local/java/jdk"
#
# Environment Variables
#
if [ -z "${pidfilepath}" ]; then
pidfilepath="${DefaultPidFile}"
fi
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
graphtitle=${graphtitle:-$pidfilepath}
JAVA_HOME=${javahome:-/usr/local/java/jdk}
if [ -z "${graphtitle}" ]; then
graphtitle="${pidfilepath}"
fi
if [ -z "${javahome}" ]; then
JAVA_HOME="${DefaultJavaHome}"
else
JAVA_HOME="${javahome}"
fi
export JAVA_HOME
#

View File

@ -35,25 +35,11 @@
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
# javahome - Defaults to '/usr/local/java/jdk'
#
DefaultPidFile="/var/run/jsvc.pid"
DefaultJavaHome="/usr/local/java/jdk"
#
# Environment Variables
#
if [ -z "${pidfilepath}" ]; then
pidfilepath="${DefaultPidFile}"
fi
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
graphtitle=${graphtitle:-$pidfilepath}
JAVA_HOME=${javahome:-/usr/local/java/jdk}
if [ -z "${graphtitle}" ]; then
graphtitle="${pidfilepath}"
fi
if [ -z "${javahome}" ]; then
JAVA_HOME="${DefaultJavaHome}"
else
JAVA_HOME="${javahome}"
fi
export JAVA_HOME
#