#!/bin/sh
# Dmle Nov 2006
# ------------------------------------------------------
# HSQLDB client console
#--------------------------------------------------------

######################################
# Parameters
######################################

# library functions & global parameters
source $AUTOMED/bin/common_functions


dbname=automed1

echo "Stopping existing db server for '$dbname' if ON..."
stop_hsql_db $dbname

echo "Initialising db '$dbname'"
cp $AUTOMED/etc/hsql_init_db.sql $AUTOMED_DIR/$dbname.script

echo "Starting HSQLDB server for '$dbname'..."
start_hsql_db $AUTOMED_DIR/$dbname 9101 $dbname

#init_db automed1

#stop_hsql_db automed1

#start_hsql_db

exit 0
