david_williams | 556a581 | 2008-09-08 15:48:46 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # |
| 4 | # This script makes it easier to launch various cloudscape tools |
| 5 | # Usage: "sh cs.sh <command>" |
| 6 | # where <command> is one of "start, stop, ij, look" |
| 7 | # |
| 8 | |
| 9 | # where the Cloudscape libraries reside |
| 10 | CSLIB=/Volumes/Stuff/Java/Cloudscape_10.0/lib |
| 11 | |
| 12 | # where the DBs live |
| 13 | DBROOT=/tmp/cloudscape |
| 14 | |
| 15 | # name of the default DB |
| 16 | DBNAME=perfDB |
| 17 | |
| 18 | # the Java VM |
| 19 | JAVA=/usr/bin/java |
| 20 | |
| 21 | NSC="$JAVA -Dcloudscape.system.home=$DBROOT com.ihost.cs.drda.NetworkServerControl" |
| 22 | |
| 23 | export CLASSPATH="${CSLIB}/cs.jar:${CSLIB}/cstools.jar:${CSLIB}/csnet.jar:${CLASSPATH}" |
| 24 | |
| 25 | case $1 in |
| 26 | start ) |
| 27 | $NSC start -h 0.0.0.0 |
| 28 | break;; |
| 29 | |
| 30 | stop ) |
| 31 | $NSC shutdown |
| 32 | break;; |
| 33 | |
| 34 | ij ) |
| 35 | $JAVA -Dij.protocol=jdbc:cloudscape: -Dij.database=$DBROOT/$DBNAME com.ihost.cs.tools.ij |
| 36 | break;; |
| 37 | |
| 38 | look ) |
| 39 | $JAVA com.ihost.cs.tools.cslook -d jdbc:cloudscape:$DBROOT/$DBNAME |
| 40 | break;; |
| 41 | |
| 42 | * ) |
| 43 | echo "unknown command $1" |
| 44 | break ;; |
| 45 | esac |