X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fdistribution%2Fopendaylight%2Fsrc%2Fmain%2Fresources%2Frun.sh;h=58ead435103c24fd27d99f8d8f541b6135611027;hp=2daa1f42e3da236d9b320bdad504cdf48eb67903;hb=7b6412204f3ed497ec298f491404ca6eedf6d55d;hpb=9822a34fdd144aeb9932492e1605715eb472ecad diff --git a/opendaylight/distribution/opendaylight/src/main/resources/run.sh b/opendaylight/distribution/opendaylight/src/main/resources/run.sh index 2daa1f42e3..58ead43510 100755 --- a/opendaylight/distribution/opendaylight/src/main/resources/run.sh +++ b/opendaylight/distribution/opendaylight/src/main/resources/run.sh @@ -10,6 +10,9 @@ fi if [[ $platform == 'linux' ]]; then fullpath=`readlink -f $0` + + [[ -z ${JAVA_HOME} ]] && [[ -x "/usr/lib/jvm/java-1.7.0" ]] && export JAVA_HOME='/usr/lib/jvm/java-1.7.0'; + elif [[ $platform == 'osx' ]]; then TARGET_FILE=$0 cd `dirname $TARGET_FILE` @@ -44,10 +47,10 @@ function usage { exit 1 } -if [ -v "TMP" ]; then - pidfile="${TMP}/opendaylight.PID" -else +if [ -z ${TMP} ]; then pidfile="/tmp/opendaylight.PID" +else + pidfile="${TMP}/opendaylight.PID" fi debug=0 debugsuspend=0