Projet

Général

Profil

Révision 6af31ea3

ID6af31ea318158bf89e0ffe5b95fd23890b6115f2
Parent 4becc789
Enfant 7a52b375

Ajouté par Lars Kruse il y a plus de 7 ans

Plugins jstat__*: simplify handling of environment settings

Voir les différences:

plugins/jvm/jstat__heap
35 35
#       pidfilepath  - Which file path use. Defaults to '/var/run/jsvc.pid'
36 36
#       javahome     - Defaults to '/usr/local/java/jdk'
37 37
#
38
DefaultPidFile="/var/run/jsvc.pid"
39
DefaultJavaHome="/usr/local/java/jdk"
40 38

  
41
#
42
# Environment Variables
43
#
44
if [ -z "${pidfilepath}" ]; then
45
  pidfilepath="${DefaultPidFile}"
46
fi
39
pidfilepath=${pidfilepath:-/var/run/jsvc.pid}
40
graphtitle=${graphtitle:-$pidfilepath}
41
JAVA_HOME=${javahome:-/usr/local/java/jdk}
47 42

  
48
if [ -z "${graphtitle}" ]; then
49
  graphtitle="${pidfilepath}"
50
fi
51

  
52
if [ -z "${javahome}" ]; then
53
  JAVA_HOME="${DefaultJavaHome}"
54
else
55
  JAVA_HOME="${javahome}"
56
fi
57 43
export JAVA_HOME
58 44

  
59 45
#

Formats disponibles : Unified diff