Skip to content

Commit

Permalink
fix: Allow alternate Java location
Browse files Browse the repository at this point in the history
  • Loading branch information
hangy committed Dec 8, 2019
1 parent 9518ef0 commit 81e4cea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hm2mqtt-addon/rc.d/hm2mqtt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 81e4cea

Please sign in to comment.