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:
parent
4becc789de
commit
6af31ea318
@ -35,25 +35,11 @@
|
|||||||
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
|
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
|
||||||
# javahome - Defaults to '/usr/local/java/jdk'
|
# javahome - Defaults to '/usr/local/java/jdk'
|
||||||
#
|
#
|
||||||
DefaultPidFile="/var/run/jsvc.pid"
|
|
||||||
DefaultJavaHome="/usr/local/java/jdk"
|
|
||||||
|
|
||||||
#
|
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
|
||||||
# Environment Variables
|
graphtitle=${graphtitle:-$pidfilepath}
|
||||||
#
|
JAVA_HOME=${javahome:-/usr/local/java/jdk}
|
||||||
if [ -z "${pidfilepath}" ]; then
|
|
||||||
pidfilepath="${DefaultPidFile}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${graphtitle}" ]; then
|
|
||||||
graphtitle="${pidfilepath}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${javahome}" ]; then
|
|
||||||
JAVA_HOME="${DefaultJavaHome}"
|
|
||||||
else
|
|
||||||
JAVA_HOME="${javahome}"
|
|
||||||
fi
|
|
||||||
export JAVA_HOME
|
export JAVA_HOME
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -35,25 +35,11 @@
|
|||||||
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
|
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
|
||||||
# javahome - Defaults to '/usr/local/java/jdk'
|
# javahome - Defaults to '/usr/local/java/jdk'
|
||||||
#
|
#
|
||||||
DefaultPidFile="/var/run/jsvc.pid"
|
|
||||||
DefaultJavaHome="/usr/local/java/jdk"
|
|
||||||
|
|
||||||
#
|
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
|
||||||
# Environment Variables
|
graphtitle=${graphtitle:-$pidfilepath}
|
||||||
#
|
JAVA_HOME=${javahome:-/usr/local/java/jdk}
|
||||||
if [ -z "${pidfilepath}" ]; then
|
|
||||||
pidfilepath="${DefaultPidFile}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${graphtitle}" ]; then
|
|
||||||
graphtitle="${pidfilepath}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${javahome}" ]; then
|
|
||||||
JAVA_HOME="${DefaultJavaHome}"
|
|
||||||
else
|
|
||||||
JAVA_HOME="${javahome}"
|
|
||||||
fi
|
|
||||||
export JAVA_HOME
|
export JAVA_HOME
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -35,25 +35,11 @@
|
|||||||
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
|
# pidfilepath - Which file path use. Defaults to '/var/run/jsvc.pid'
|
||||||
# javahome - Defaults to '/usr/local/java/jdk'
|
# javahome - Defaults to '/usr/local/java/jdk'
|
||||||
#
|
#
|
||||||
DefaultPidFile="/var/run/jsvc.pid"
|
|
||||||
DefaultJavaHome="/usr/local/java/jdk"
|
|
||||||
|
|
||||||
#
|
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
|
||||||
# Environment Variables
|
graphtitle=${graphtitle:-$pidfilepath}
|
||||||
#
|
JAVA_HOME=${javahome:-/usr/local/java/jdk}
|
||||||
if [ -z "${pidfilepath}" ]; then
|
|
||||||
pidfilepath="${DefaultPidFile}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${graphtitle}" ]; then
|
|
||||||
graphtitle="${pidfilepath}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${javahome}" ]; then
|
|
||||||
JAVA_HOME="${DefaultJavaHome}"
|
|
||||||
else
|
|
||||||
JAVA_HOME="${javahome}"
|
|
||||||
fi
|
|
||||||
export JAVA_HOME
|
export JAVA_HOME
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user