diff --git a/hm2mqtt-addon/rc.d/hm2mqtt b/hm2mqtt-addon/rc.d/hm2mqtt index 3ee285f..b17fd55 100755 --- a/hm2mqtt-addon/rc.d/hm2mqtt +++ b/hm2mqtt-addon/rc.d/hm2mqtt @@ -12,12 +12,12 @@ start() { logger -t homematic -p user.info "starting hm2mqtt" if [ -x "/opt/jre/bin/java" ]; then JAVA_BIN=/opt/jre/bin/java + elif [ -x "/opt/jre-1.8.0_121-compact3/bin/java" ]; then + JAVA_BIN=/opt/jre-1.8.0_121-compact3/bin/java + elif [ -x "/opt/java/bin/java" ]; then + JAVA_BIN=/opt/java/bin/java else - if [ -x "/opt/jre-1.8.0_121-compact3/bin/java" ]; then - JAVA_BIN=/opt/jre-1.8.0_121-compact3/bin/java - else - JAVA_BIN=/opt/ejre1.7.0_10/bin/java - fi + JAVA_BIN=/opt/ejre1.7.0_10/bin/java fi start-stop-daemon -S -q -b -m -p /var/run/hm2mqtt.pid --exec ${JAVA_BIN} -- -Xmx32m -jar /usr/local/addons/hm2mqtt/hm2mqtt.jar `cat /usr/local/addons/hm2mqtt/options` echo "OK"