File tree 3 files changed +6
-45
lines changed
3 files changed +6
-45
lines changed Original file line number Diff line number Diff line change 1
- #! /usr/bin/env bash
2
-
3
- set -u
4
- set -o pipefail
5
-
6
- JAR=" /usr/lib/nrjmx/nrjmx.jar"
7
- if [[ ! -s " ${JAR} " ]]; then
8
- # Gets the directory where the script is located. Works on mac or linux
9
- SCRIPTDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd -P) "
10
- JAR=" ${SCRIPTDIR} /nrjmx.jar"
1
+ #! /usr/bin/env sh
2
+ if [ -f /usr/lib/nrjmx/nrjmx.jar ]; then
3
+ java -jar /usr/lib/nrjmx/nrjmx.jar $@
4
+ else
5
+ java -jar ` dirname $0 ` /nrjmx.jar $@
11
6
fi
12
-
13
- if [[ ! -s " ${JAR} " ]]; then
14
- echo " ERROR - jar ${JAR} does not exist" > /dev/stderr
15
- exit 1
16
- fi
17
-
18
- JAVA=" ${JAVA_HOME:- } /bin/java"
19
- if [[ ! -s " ${JAVA} " ]]; then
20
- JAVA=$( which java 2> /dev/null)
21
- fi
22
-
23
- if [[ ! -s " ${JAVA} " ]]; then
24
- echo " ERROR - unable to find java binary on PATH or in JAVA_HOME/bin" > /dev/stderr
25
- exit 1
26
- fi
27
-
28
- " ${JAVA} " -jar " ${JAR} " $@
29
-
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3
3
<modelVersion >4.0.0</modelVersion >
4
4
<groupId >nrjmx</groupId >
5
5
<artifactId >nrjmx</artifactId >
6
- <version >1.0.3 </version >
6
+ <version >1.0.4 </version >
7
7
<name >nrjmx</name >
8
8
<description >The New Relic JMX tool provides a command line tool to connect to a JMX server and retrieve the MBeans it exposes.</description >
9
9
<organization >
You can’t perform that action at this time.
0 commit comments