#!/bin/sh
#
# Copyright (c) 1999-2005 Easysoft Ltd. All rights reserved.
#
# $Id: install,v 1.30 2004/03/17 14:57:50 nick Exp $
#

#
#
# Clear the screen
#
if [ -x /usr/bin/clear ]; then
  /usr/bin/clear
fi
if [ ! -x ./install ];then
  echo "You must run the install script from the directory created by"
  echo "untarring the main distribution file."
  exit 1
fi
#
# Output starting screen
#
cat <<EOF
Installation procedure for the Easysoft JDBC-ODBC Bridge

(c) Easysoft Ltd 1999-2005

Please read the file INSTALL before attempting to install.

EOF
#
# Which echo?
#
if [ -x /bin/echo ];then
  ECHO="/bin/echo"
else
  if [ -x /usr/bin/echo ];then
    ECHO="/usr/bin/echo"
  else
    cat <<EOF
Cannot find the echo command
EOF
  exit 1
  fi
fi
#
# echo interprets backslash chrs by default? POSIX says no.
#
test=`$ECHO "fred\c"`
if [ "$test" = "fred\c" ];then
  ECHO="$ECHO -e "
  test=`$ECHO "fred\c"`
  if [ "$test" != "fred" ];then
    cat <<EOF
echo command ($ECHO) does not interpret backslash characters.
You may see backslash c's when asked questions during this install.
You can safely ignore this except in Linux where you may need to
edit /etc/ld.so.conf to remove extra backslash n's from the lines added
by this script.
EOF
  fi
fi
export ECHO			# allow child scripts to see ECHO
#
# Introduction and Licensing
#
./install_intro JOB_intro.txt
if [ $? -ne 0 ];then
  exit $?
fi


#
# Check the command line args
#
#
# Look for optional args
#
if [ $# -gt 0 ];then
  SKIP="$1"
else 
  SKIP=""
fi
SKIPCLIENT=`$ECHO $SKIP | grep 'c' 2>/dev/null`
SKIPSERVER=`$ECHO $SKIP | grep 's' 2>/dev/null`
SKIPLICENSING=`$ECHO $SKIP | grep 'l' 2>/dev/null`
SKIPUNIXODBC=`$ECHO $SKIP | grep 'u' 2>/dev/null`

#
# Check we have the tools we need.
# ================================
#
./install_check_tools
if [ $? -ne 0 ];then
  exit $?
fi
# Need to do tr here as we need to decide what to use for upper->lower
if ( $ECHO "TeSt" | tr '[A-Z]' '[a-z]' 1>/dev/null 2>/dev/null )
then
  $ECHO "tr \c"
  lowctest=`$ECHO "TeSt" | tr '[A-Z]' '[a-z]'`
  if [ "$lowctest" != "test" ];then
    $ECHO
    $ECHO "Do not know how to use tr command to convert uppercase to lowercase"
  else
    LOWERCASE="tr '[A-Z]' '[a-z]'"
  fi
fi
if [ "$LOWERCASE" = "" ];then
  $ECHO "Trying dd"
  lowctest=`$ECHO "TeSt" | dd conv=lcase`
  if [ "$lowctest" != "test" ];then
    $ECHO "Do not know how to use dd command to convert uppercase to lowercase"
  else 
    LOWERCASE="dd conv=lcase"
  fi
fi
if [ "$LOWERCASE" = "" ];then
  $ECHO "Trying sed"
  lowctest=`$ECHO "TeSt" | sed 'y/TES/tes/'`
  if [ "$lowctest" != "test" ];then
    $ECHO "Do not know how to use sed command to convert uppercase to lowercase"
    $ECHO "Cannot continue without a working tr, dd or sed command"
    exit 1
  else
    LOWERCASE="sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'"
  fi
fi
export LOWERCASE
$ECHO
$ECHO
#
# Set up vars used throughout.
# ============================
#
DEFAULT_PATH="/usr/local"    # default base install path
INST_SUBDIR="easysoft"       # dir under above JOB installed in
INSTINFOFILE="job_install.info" #where certain install information is recorded
SUPPORT_EMAIL="support@easysoft.com"
export SUPPORT_EMAIL
INSTALLED_UNIXODBC=""        # installed unixODBC DM?
INSTALLED_CLIENT=""          # installed JOB Client?
INSTALLED_SERVER=""          # installed JOB Server?
INSTALLED_COMMON=""          # installed common JOB components?
INSTALLED_LDSO_LINKS=""      # Updated ld.so (linux only)
TARSTDERROUTPUT="$INSTALLSCRIPTDIR/esjobtarerr"
                             # stderr output from any tar extract
INSTALLWARNING="$INSTALLSCRIPTDIR/warnings" # Any warnings during install
#
# See what platform we are on
# ===========================
#
PLATFORM=`uname -s`
platform=`uname -s | $LOWERCASE`
export platform
osrelease=`uname -r`
osversions=`uname -v`
echo "Installation for $platform chosen"
#
# Platform specific differences
# =============================
#
# PIDARG is column is ps output where process ID shown
# PSARGS are the arguments to ps to generate process output that can be
# grepped for inetd's PID
#
PIDARG="1"
TESTLINK="-L"
TESTEXISTS="-e"
if [ "$platform" = "aix" ];then
  PSARGS="ax"
fi
if [ "$platform" = "hp-ux" ];then
  PSARGS="-ef"
  PIDARG="2"
fi
if [ "$platform" = "linux" ];then
  PSARGS="ax"
fi
if [ "$platform" = "sunos" ];then
  PSARGS="-ef"
  PIDARG="2"
  TESTEXISTS="-r"
  TESTLINK="-h"
fi
if [ "$platform" = "sco_sv" ];then
  PSARGS="-ef"
  PIDARG="2"
  TESTEXISTS="-r"
fi

if [ "$platform" = "unixware" ];then
  PSARGS="-ef"
  PIDARG="2"
  TESTEXISTS="-r"
fi

if [ "$platform" = "unix_sv" ];then
  PSARGS="-ef"
  PIDARG="2"
  TESTEXISTS="-r"
fi

if [ "$platform" = "freebsd" ];then
  PSARGS="ax"
  TESTLINK="-h"
fi
if [ "$platform" = "sinix-n" ];then
  PSAREGS="-ef"
  PIDARG="2"
  TESTEXISTS="-r"
  TESTLINK="-h"
fi
if [ "$platform" = "osf1" ];then
  PSAREGS="-ef"
  PIDARG="2"
fi  
export TESTEXISTS		# make TESTEXISTS available to child scripts
export TESTLINK			# make TESTLINK available to child scripts
#
# Platform specific checks
# ========================
#
# Linux - see what the highest version of libc installed is.
#
if [ "$platform" = "linux" ];then
  ./install_check_linux 'JDBC-ODBC Bridge' 1
  if [ $? != 0 ];then
    exit $?
  fi
fi
#
# Check the package
# =================
#
# Check the tar file(s) exist (there may be more than one)
#  e.g. for multiple sub-packages
# Check the md5sum/sum is correct.
# 
$ECHO "Press the return key to continue"
read press
$ECHO
$ECHO "Checking your package is OK..."
TARPATTERN="*.tar"
TARFILE_LIST=`$ECHO $TARPATTERN`
exist=`$ECHO $TARFILE_LIST`
#
# If the shell did not expand *.tar then there can't be any matching
# tar files in this dir.
#
if [ "$exist" = "$TARPATTERN" ]; then
  $ECHO "Cannot find any tar file packages matching \"$TARPATTERN\" in"
  $ECHO "the current directory. Are you sure you are running the install"
  $ECHO "script in the same directory the first tar file was unpacked to?"
  exit 1
fi
#
# Find out how many tar files we have and check each one.
#
TARFILES=`$ECHO $TARFILE_LIST | wc -w | awk '{print $1}'`
$ECHO "Found $TARFILES package(s)"
for TARFILE in $TARFILE_LIST
do
  $ECHO "Checking $TARFILE"
  if [ ! -r $TARFILE ];then
    $ECHO "Cannot find readable $TARFILE file"
    exit 1
  fi
  #
  # Try checking the tar file with md5sum.
  #
  checked=""
  if [ -r $TARFILE.md5sum ];then
    if ( $ECHO "test" | md5sum 2> /dev/null 1> /dev/null )
    then
      check=`md5sum $TARFILE | awk '{print $1}'`
      check2=`cat $TARFILE.md5sum`
      if [ "$check" = "$check2" ];then
  	checked="ok"
      else
  	checked="fail"
      fi
    else
      #$ECHO "Can't find md5sum on this machine"
      $ECHO
    fi
  else
    #$ECHO "$TARFILE.md5sum not found - ignoring."
    $ECHO
  fi
  #
  # Try checking the tar file with sum.
  #
  if [ "$checked" = "" ];then
    if  [ -r $TARFILE.sum ];then
      if ( $ECHO "test" | sum 2> /dev/null 1> /dev/null )
      then
  	check=`sum $TARFILE | awk '{print $1}'`
  	check2=`cat $TARFILE.sum`
  	if [ "$check" = "$check2" ];then
  	  checked="ok"
  	else
  	  checked="fail"
  	fi
      else
  	$ECHO "Can't find sum on this machine"
      fi
    else
      $ECHO "$TARFILE.sum not found - ignoring,"
    fi
  fi
done
#
# Tar files not checksummed
# =========================
#
# If we failed to check a tar file then give the installer a chance to
# pull out of the installation.
#
if [ "$checked" = "" ];then
  $ECHO "Tarred packages not checked - can't find md5sum or sum."
  $ECHO "This package comes with a md5 message digest and a checksum."
  $ECHO "The installation was unable to check the package due to either"
  $ECHO "[1] failed to locate md5sum or sum."
  $ECHO "[2] failed to locate the md5 or checksum package files."
  $ECHO "It is not absolutely necessary to check your package in this way"
  $ECHO "and it is usually safe to continue."
  $ECHO
  $ECHO "Do you want to continue? (y/n) [y]: \c"
  answer="haha"
  while [ "$answer" != "" -a "$answer" != "n" -a "$answer" != "y" ]
  do
    read answer
    if [ "$answer" = "" ];then
      answer="y"
    fi
    if [ "$answer" != "y" ];then
      $ECHO "Installation terminated"
      exit 99
    fi
  done
fi
$ECHO "Package check - OK"
$ECHO
$ECHO "Press the return key to continue"
read press


#
# Check for root
# ==============
#
./install_check_root 'JDBC-ODBC Bridge' JOB_check_root.txt 1
if [ $? -ne 0 ];then
  exit $?
fi
#
#  Install Path
#  ============
#
cat <<EOF

You need to enter a location for the Easysoft JDBC-ODBC Bridge Server. You
should specify an existing directory under which directories called
"$INST_SUBDIR/job", "$INST_SUBDIR/lib", "$INST_SUBDIR/bin" and possibly
"$INST_SUBDIR/unixODBC" will be created. You need
write permission to the specified directory. If the last directory in the
path you specify does not exist the installation will ask whether
you would like it to be created.

Just hit <enter> for the defaults.
EOF

#
# Request and create installation path
# ====================================
#
path=""
while [ "$path" = "" ]
do
  $ECHO "Enter a base install directory (q=quit) [ $DEFAULT_PATH ]: \c"
  read path
  if [ "$path" = "q" ];then
    $ECHO "Installation aborted at user request"
    exit 99
  fi
  if [ "$path" = "" ];then
    path="$DEFAULT_PATH"
  fi
  if [ ! -d "$path" ]; then
    $ECHO "$path does not exist"
    $ECHO "Do you want to attempt to create it (y/n) [y]: \c"
    answer="hoho"
    while [ "$answer" != "" -a "$answer" != "n" -a "$answer" != "y" ]
    do
      read answer
      if [ "$answer" = "" ];then
        answer="y"
      fi
      if [ "$answer" = "y" ];then
        mkdir $path
	if [ $? -ne 0 ]
	then
          $ECHO "Failed to create $path"
	  path=""
	fi
      else
        path=""
      fi
    done
  elif [ ! -w "$path" ]; then
    $ECHO "$path is not writeable"
    path=""
  fi
done
$ECHO
#
# We now make the <install_path>/$INST_SUBDIR tree.
# INST_SUBDIR may have more than one dir in it.
#
$ECHO "Making install dir \c"
echo "$path/$INST_SUBDIR" | sed 's,//,/,g'
flds=`echo "$INST_SUBDIR" | sed 's,/, ,g'`
base=`echo "$INST_SUBDIR" | awk -F/ '{print $NF}'`
stem=""
for dir in $flds
do
  xpath=`echo $path/$stem/$dir | sed 's,//,/,g'`
  if [ -d "$path/$stem/$dir" ];then
    $ECHO "$xpath already exists."
    $ECHO
    if [ "$dir" = "$base" ];then
      $ECHO "If you are reinstalling then it is wise to delete"
      $ECHO "$path/easysoft/job first and"
      $ECHO "(as this will tell you if files are in use)."
      $ECHO
      $ECHO "If you are upgrading from a previous beta then Easysoft strongly"
      $ECHO "recommend you remove the previous beta first."
      $ECHO "However, you may continue if you wish."
      $ECHO ""
      $ECHO "Continue with install? (y/n) [y]: \c"
      answer="haha"
      while [ "$answer" != "" -a "$answer" != "n" -a "$answer" != "y" ]
      do
        read answer
        if [ "$answer" = "" ];then
          answer="y"
        fi
        if [ "$answer" != "y" ];then
          $ECHO "Installation terminated"
          exit 99
        fi
      done
    fi
  else
    if ( mkdir $xpath )
    then
      $ECHO "$xpath created"
    else
      $ECHO "Failed to create $xpath"
      exit 1
    fi
  fi
  stem="$stem/$dir"
done
#
#  If not installed in the default place provide a symbolic link from the
#  default to the actual or shared object runpaths won't work.
#
if [ "$path" != "$DEFAULT_PATH" ];then
cat <<EOF

WARNING:
You have not chosen the default path for installing the Easysoft JDBC-ODBC
Bridge. For the built-in shared object run paths and licensing to work the
installation needs to link $DEFAULT_PATH/$INST_SUBDIR to $path/$INST_SUBDIR.

EOF
  answer="hoho"
  if [ "$TESTEXISTS" "$DEFAULT_PATH/$INST_SUBDIR" ];then
    $ECHO "but $DEFAULT_PATH/$INST_SUBDIR already exists"
    if [ "$TESTLINK" "$DEFAULT_PATH/$INST_SUBDIR" ];then
      $ECHO "and is a symbolic link."
      $ECHO "Do you want to replace the symbolic link"
      $ECHO "$DEFAULT_PATH/$INST_SUBDIR ? (y/n) [y]: \c"
      while [ "$answer" != "" -a "$answer" != "n" -a "$answer" != "y" ]
      do
  	read answer
  	if [ "$answer" = "" ];then
  	  answer="y"
  	fi
      done
    else
      $ECHO "and is not a symbolic link."
      cat <<EOF
Please see the INSTALL file for information on how this may be corrected
before continuing with this installation.
EOF
    fi
  else
    if [ ! "$TESTEXISTS" /usr/local ]; then
      if ( mkdir /usr/local )
      then
        $ECHO "/usr/local created"
      else
        $ECHO "Failed to create /usr/local"
      fi
    fi
    answer="y"
  fi
  if [ "$answer" = "y" ];then
    #
    # would like to use -sf (force) but some platforms do not have -f
    # so move existing link out of the way
    #
    mv $DEFAULT_PATH/$INST_SUBDIR $DEFAULT_PATH/${INST_SUBDIR}_before_easysoft
    ln -s $path/$INST_SUBDIR $DEFAULT_PATH/$INST_SUBDIR
    if [ $? -ne 0 ]; then
      $ECHO "**WARNING** Failed to create symbolic link"
      $ECHO "See INSTALL file for information on how this may be corrected"
    fi
  fi
fi
#
# Record the version of JOB installed
# Note this depends on the directory name.
#
VERSION=`pwd | sed 's|.*\([0-9]\{1,2\}\)\.\([0-9]\{1,2\}\)\.\([0-9]\{1,2\}\)\.\([0-9]\{1,2\}\).*|\1.\2.\3.\4|'`
$ECHO "product: jdbc-odbc-bridge" >> $path/$INST_SUBDIR/$INSTINFOFILE
$ECHO "version: $VERSION" >> $path/$INST_SUBDIR/$INSTINFOFILE
$ECHO "date: \c" >> $path/$INST_SUBDIR/$INSTINFOFILE
date 2>/dev/null >> $path/$INST_SUBDIR/$INSTINFOFILE

#
# On AIX make sure and shared objects not in use are unloaded.
#
if [ "$platform" = "aix" ];then
  if [ -x /usr/sbin/slibclean ];then
    /usr/sbin/slibclean
  fi
fi
#
# There may be running JOBs.
#
if [ -x /usr/local/easysoft/job/stopjob ]; then
  cat <<EOF

This install has detected an existing JOB installation.
If you have running JOB servers they could stop this installation from
completing successfully. This installation can use the existing stopjob
script to shut down any running JOB Servers or you can do this manually
by running /usr/local/easysoft/job/stopjob.

EOF
  answer="hoho"
  while [ "$answer" != "" -a "$answer" != "n" -a "$answer" != "y" ]
  do
    $ECHO "Do you want this install to run stopjob for you (y/n) [y]: \c"
    read answer
    if [ "$answer" = "" ]; then
      answer="y"
    fi
    if [ "$answer" = "y" ]; then
      cwd=`pwd`
      cd /usr/local/easysoft/job
      ./stopjob
      cd "$cwd"
    fi
  done
fi
#
# Install JOB Common
# ==================
#
# Unpack the common tar file
#

if [ "$SKIPCLIENT" != "" ];then
  $ECHO
  $ECHO "Skipping JOB client installation as requested"
  $ECHO
else
  cwd=`pwd`
  cd $path/$INST_SUBDIR
  $ECHO
  $ECHO "Unpacking Common parts of the JDBC ODBC Bridge distribution"
  $ECHO "Target directory is: `pwd`"
  $ECHO "Press the return key to continue"
  read press
  tar -xvf $cwd/all*.tar  

  INSTALLED_COMMON="y"
  cd "$cwd"
fi

#
# Install Versioned Common files
# ==============================
#
if [ "$SKIPSERVER" != "" ];then
  $ECHO
  $ECHO "Skipping JOB Server installation as requested"
  $ECHO
else
  ./install_versioned "$path/$INST_SUBDIR"
  if [ $? -ne 0 ];then
    $ECHO "WARNING Failed to install all versioned files"
    $ECHO "Please mail Easysoft support at $SUPPORT_EMAIL"
  fi

  #
  # Install the JOB Server (files)
  #

  cat <<EOF

The JDBC-ODBC Bridge Server will now be installed. The Server will 
allow you to access ODBC drivers on this machine from other remote 
machines (where you use the JOB Client). The JOB Server is linked 
against the libodbc shared object so you must either:

[1] If the unixODBC driver manager is installed ensure that the ODBC data
    source(s) that you wish to connect to are set up.

[2] Install the unixODBC Driver Manager (which provides libodbc) and then
    tell the driver manager about your ODBC Drivers 
    see http://www.unixodbc.org/odbcinst.html and set up your data source(s)
    

EOF
  
  #
  # Unpack the Server tar file
  #
  cwd=`pwd`
  cd $path/$INST_SUBDIR
  $ECHO
  $ECHO "Unpacking Server parts of the JDBC-ODBC Bridge distribution"
  $ECHO "Press the return key to continue"
  read press
  tar -xvf $cwd/server*.tar   
  ln -s $path/$INST_SUBDIR/job/admin $path/$INST_SUBDIR/job/server/admin
  cd  $path/$INST_SUBDIR/job/server
  
  username=`id | awk '{print $1}' | awk -F'(' '{print $2}' | awk -F')' '{print $1}'`
  $ECHO "Setting $username as the Web Server Administrator "
   
  echo "HTTPAdmin = $username" >> esjobserver.ini
  #    cd $path/$INST_SUBDIR/job/demo ; ln -s ../images .
  INSTALLED_SERVER="y"
  $ECHO
  cd $cwd
  #
  $ECHO "Press the return key to continue"
  read press
fi

#
# Install unixODBC DM
# ===================
#
# Give the installer a chance to install unixODBC
#


if [ "$SKIPUNIXODBC" != "" ];then
  $ECHO 
  $ECHO "Skipping unixODBC installation as requested"
  $ECHO
else
  ./uodbc install unixodbc $path/$INST_SUBDIR 'JDBC-ODBC Bridge' JOB 1 0
  if [ $? -gt 1 ];then
    $ECHO "Failed to install/locate unixODBC"
  else
    if [ $? -eq 1 ];then
      INSTALLED_UNIXODBC="y"	# unixODBC DM was installed
    fi
  fi
fi

$ECHO "Press the return key to continue"
read press
#
# Set LD_LIBRARY_PATH and LD_RUN_PATH so we can pick up unixODBC libs.
#
LDPATHLIBDIRS="$path/$INST_SUBDIR/lib"
if [ "$INSTALLED_CLIENT" != "" ];then
  LDPATHLIBDIRS="$LDPATHLIBDIRS:$path/$INST_SUBDIR/lib"
fi
if [ "$INSTALLED_UNIXODBC" != "" ];then
  LDPATHLIBDIRS="$LDPATHLIBDIRS:$path/$INST_SUBDIR/unixODBC/lib"
fi
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LDPATHLIBDIRS"
export LD_LIBRARY_PATH
LD_RUN_PATH="$LD_RUN_PATH:$LDPATHLIBDIRS"
export LD_RUN_PATH
SHLIB_PATH="$SHLIB_PATH:$LDPATHLIBDIRS"
export SHLIB_PATH
LDLIBDIRS=`echo $LDPATHLIBDIRS | sed 's/:/ /g'`
#
# Install ld.so paths
# ===================
#
# To finish off the Server/unixODBC/Common install, we need to add
# entries to the /etc/ld.so.conf file for the dynamic linker. We need to be
# root for that. In all cases we at least need to install the job/lib dir.
#
if [ \( "$SKIPSERVER" = "" \) -o \( "$SKIPLICENSING" = "" \) -o \( "$SKIPUNIXODBC" = "" \) ];then
  ./install_linkpaths 'JDBC-ODBC Bridge' $LDLIBDIRS
  if [ $? -ne 0 ];then
    $ECHO "WARNING: Failed to install all link paths"
  fi
  #
  # Install esld.so.conf entries
  #
  ./install_paths "$path/$INST_SUBDIR" $LDLIBDIRS
  if [ $? -ne 0 ];then
    $ECHO "WARNING: esld.so.conf file not updated successfully"
  fi
  #
  #  Exit now if server not installed
  #
  if [ "$INSTALLED_SERVER" != "y" ];then
    $ECHO "Installation completed successfully"
    exit 0
  fi
fi
#
#
# root-specific install
# =====================
#
if [ "$SKIPLICENSING" != "" ];then
  $ECHO
  $ECHO "Skipping licensing as requested"
  $ECHO
else
  cat <<EOF
The JOB Server requires a  license.
Free, time limited licences can be obtained and installed in the course 
of this install. This requires this  installation to be run as root.


EOF
uid=`id | awk '{print $1}' | awk -F= '{print $2}' | awk -F\( '{print $1}'`
GETLICENSE=""
$ECHO 
$ECHO "You must be root to license JOB."
$ECHO ""
if [ "$uid" != "0" ];then
  cat <<EOF
...and you are not root

You may already have a license for JOB if you have other Easysoft DATA Access components on this machine.
EOF
GETLICENSE="WARNING: You haven't obtained a license for JOB as a result of running this script"
$ECHO "Press the return key to continue"
read press

else 
#
# Check for an existing license dir and file. If one does not exist make
# the license dir and copy a blank license file in to it.
#
./install_license 'JOB Server' /usr/local/easysoft

fi

fi

cd $cwd
$ECHO
$ECHO "** The JOB Server has been installed successfully **"
$ECHO $GETLICENSE
#
#cp server/install/shell_startup.conf server/server
#
cd $cwd



$ECHO "Starting JOB Server by running the script startjob "
$ECHO "in $path/$INST_SUBDIR/job in the background."
$ECHO "The JOB Server startup script  redirects its output"
$ECHO "to $path/$INST_SUBDIR/job/server/LOG"

cd  $path/$INST_SUBDIR/job
$ECHO "cd  $path/$INST_SUBDIR/job"
$ECHO "./startjob"
./startjob


$ECHO "Use the following URL to test your installation: "
$ECHO ""
$ECHO "http://`hostname`:8031/"
$ECHO ""

$ECHO "If the port 8031 is used you can change the port used by JOB by editing"
$ECHO "$path/$INST_SUBDIR/job/server/esjobserver.ini"

$ECHO ""
$ECHO "** The JOB Server has been installed successfully **"
$ECHO ""
$ECHO "The activity of the server can be shown using the command:"
$ECHO "tail -f $path/$INST_SUBDIR/job/LOG"
$ECHO "You may stop this output without effecting the running of the server."
$ECHO ""
$ECHO "To stop the job server use the command: "
$ECHO "  $path/$INST_SUBDIR/job/stopjob"

#tail -f $path/$INST_SUBDIR/job/LOG






