Skip to content

Commit f3c120c

Browse files
committed
Set JAVA_HOME, replace activator with sbt
1 parent df19705 commit f3c120c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

monit_restart.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ HOME="/home/sol"
2525

2626
# it is important to set the proper locale
2727
. $HOME/.locale
28+
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
2829
JAVA_OPTS=$(echo "$JAVA_OPTS" |sed 's#,#\ #g')
2930

3031
cd $HOME/git/$REPO
@@ -34,7 +35,9 @@ case $ACTION in
3435
kill $(cat target/universal/stage/RUNNING_PID)
3536
rm target/universal/stage/RUNNING_PID
3637
fi
37-
JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" $HOME/activator-dist-1.3.5/activator "start $PORT"
38+
sbt clean
39+
sbt --java-home $JAVA_HOME stage
40+
JAVA_OPTS="$JAVA_OPTS -XX:+ExitOnOutOfMemoryError" ./target/universal/stage/bin/nwbib -Dhttp.port=$PORT -no-version-check > monit_start.log &
3841
;;
3942
stop)
4043
kill $(cat target/universal/stage/RUNNING_PID)

0 commit comments

Comments
 (0)