Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 34f864b73d91d693058fe254f3c726b80678918a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash

if [ -z "$JAVA_HOME" ]
then
    echo The JAVA_HOME environment variable is not defined
    exit 1
fi

SCRIPT="$0"

# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
while [ -h "$SCRIPT" ] ; do 
  ls=`ls -ld "$SCRIPT"`
  # Drop everything prior to ->
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    SCRIPT="$link"
  else
    SCRIPT=`dirname "$SCRIPT"`/"$link"
  fi
done
 
KERNEL_HOME=`dirname "$SCRIPT"`/..
KERNEL_HOME=`cd $KERNEL_HOME; pwd`

#parse args for the script
TRUSTSTORE_PATH=$KERNEL_HOME/config/keystore
TRUSTSTORE_PASSWORD=changeit

shopt -s extglob

while (($# > 0))
	do
	case $1 in
	-truststore)
			TRUSTSTORE_PATH=$2
			shift;
			;;
	-truststorePassword)
			TRUSTSTORE_PASSWORD=$2
			shift;
			;;
	esac
	shift
done

JMX_OPTS=" \
	$JMX_OPTS \
	-J-Dcom.sun.tools.jconsole.mbeans.keyPropertyList=category,type \
	-J-Djavax.net.ssl.trustStore=$TRUSTSTORE_PATH \
	-J-Djavax.net.ssl.trustStorePassword=$TRUSTSTORE_PASSWORD"

$JAVA_HOME/bin/jconsole $JMX_OPTS

Back to the top