source: core/trunk/server/flarmradar.sh @ 380

Last change on this file since 380 was 380, checked in by smoser, 10 years ago

#179

File size: 934 bytes
Line 
1#!/bin/sh
2
3# determine location
4# resolve links - $0 may be a softlink
5PRG="$0"
6
7while [ -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
15done
16
17# Get standard environment variables
18PRGDIR=`dirname "$PRG"`
19
20JAVA=`which java`
21SERVER_HOME=${PRGDIR}/server
22SERVER_LOG=$SERVER_HOME/standalone/log
23
24[ -n "$JAVA" ] || { echo "No Java Runtime Environment found" && exit 1; }
25
26cd ${PRGDIR}
27
28echo "Start db .."
29nohup $JAVA -cp $SERVER_HOME/modules/com/h2database/h2/main/h2-1.3.161.jar org.h2.tools.Server -baseDir ./data > $SERVER_LOG/h2.out &
30echo "  The databse is now starting, check output in $SERVER_LOG/h2.out"
31echo " "
32
33sleep 3
34
35echo "Start Flarmradar Server .."
36nohup /bin/sh $SERVER_HOME/bin/standalone.sh > /dev/null &
37echo "  The server is now starting, check output in $SERVER_LOG/server.log"
38echo " "
Note: See TracBrowser for help on using the repository browser.