adding all of botlist, initial add
[botlist.git] / botlist_testserver / hsqldb / demo / runServer.sh
blob1c9fefe32fb153c4e00d7f9643213e1f0e1b4591
1 #!/bin/sh
2 # -----------------------------------------------------
3 # Run with -help for usage.
4 # If $JAVA_HOME is set, editing this script should not be required.
5 # Send any questions to fchoong@user.sourceforge.net
6 # -----------------------------------------------------
8 # the value set here will override the value passed by $JAVA_HOME or the -jdkhome switch
9 jdkhome=""
10 jargs=""
11 thread_flag=""
13 PRG=$0
16 # resolve symlinks
19 while [ -h "$PRG" ]; do
20 ls=`ls -ld "$PRG"`
21 link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
22 if expr "$link" : '^/' 2> /dev/null >/dev/null; then
23 PRG="$link"
24 else
25 PRG="`dirname $PRG`/$link"
27 done
29 progdir=`dirname $PRG`
30 progname=`basename $0`
32 # ../ will lead us to the home
33 dbhome="$progdir/.."
35 # absolutize dbhome
37 dbhome=`cd ${dbhome}; pwd`
40 # bring in needed functions
42 . ${dbhome}/lib/functions
44 #--------------------------------------------------------------------------------------------------------------
45 pre_main
48 # let's go
50 cd $dbhome/data
51 exec "$jdkhome/bin/java" $thread_flag -classpath "$cp" $jargs "org.hsqldb.Server" "$@"
52 # and we exit.