Rev | Line | |
---|
[378] | 1 | #!/bin/sh |
---|
| 2 | |
---|
[380] | 3 | # determine location |
---|
| 4 | # resolve links - $0 may be a softlink |
---|
| 5 | PRG="$0" |
---|
| 6 | |
---|
| 7 | while [ -h "$PRG" ]; do |
---|
| 8 | ls=`ls -ld "$PRG"` |
---|
| 9 | link=`expr "$ls" : '.*-> \(.*\)$'` |
---|
| 10 | if expr "$link" : '/.*' > /dev/null; then |
---|
| 11 | PRG="$link" |
---|
| 12 | else |
---|
| 13 | PRG=`dirname "$PRG"`/"$link" |
---|
| 14 | fi |
---|
| 15 | done |
---|
| 16 | |
---|
| 17 | # Get standard environment variables |
---|
| 18 | PRGDIR=`dirname "$PRG"` |
---|
| 19 | |
---|
[378] | 20 | JAVA=`which java` |
---|
[380] | 21 | SERVER_HOME=${PRGDIR}/server |
---|
[378] | 22 | SERVER_LOG=$SERVER_HOME/standalone/log |
---|
| 23 | |
---|
| 24 | [ -n "$JAVA" ] || { echo "No Java Runtime Environment found" && exit 1; } |
---|
| 25 | |
---|
[380] | 26 | cd ${PRGDIR} |
---|
| 27 | |
---|
[378] | 28 | echo "Start db .." |
---|
[380] | 29 | nohup $JAVA -cp $SERVER_HOME/modules/com/h2database/h2/main/h2-1.3.161.jar org.h2.tools.Server -baseDir ./data > $SERVER_LOG/h2.out & |
---|
[378] | 30 | echo " The databse is now starting, check output in $SERVER_LOG/h2.out" |
---|
[380] | 31 | echo " " |
---|
[378] | 32 | |
---|
| 33 | sleep 3 |
---|
| 34 | |
---|
| 35 | echo "Start Flarmradar Server .." |
---|
[380] | 36 | nohup /bin/sh $SERVER_HOME/bin/standalone.sh > /dev/null & |
---|
[378] | 37 | echo " The server is now starting, check output in $SERVER_LOG/server.log" |
---|
[380] | 38 | echo " " |
---|
Note: See
TracBrowser
for help on using the repository browser.