NonStop JMS User's Manual (H06.03+, J06.03+, NonStop JMS 3.0+)
Reliable Messaging Bridge
NonStop Server for Java Message Service User’s Manual—522356-006
5-20
Start Script
Example 5-2. start_template.txt File (page 1 of 3)
#! /bin/sh
# Script for starting a NSJMS Messaging bridge environment
#
# Usage:
# start
# The "start" script will start the messaging bridge environment.
# Pathcom status messages are redirected to a file.
#
# Expected environment variables:
# JAVA_HOME top level java directory
#
# Optional environment variables:
# HOMETERM
#
# If the environment variable HOMETERM is non-null it will be
# used as the home terminal for output display. Otherwise the
# window from which the script was run is used for output display.
#
# (C) Copyright 2003 Hewlett-Packard
#
# Get -v option if supplied
#
while getopts ":v" opt; do
case $opt in
v ) VERBOSE="-v" ;;
\? ) print "usage: start [-v]"
return 1
esac
done
shift $(($OPTIND - 1))
if [[ -z $JAVA_HOME ]] then
print "Environment variable JAVA_HOME must be set prior to running $0"
return 1
fi
#
# Check for NonStop Java - first T0083 then T2766. (For U64 support, Java SPR
# T2766H70 or above is supported).
#
JAVA_BINARY="$JAVA_HOME/bin/oss/posix_threads/java"
if [[ -f $JAVA_BINARY ]]; then
print "Found NonStop Java in $JAVA_BINARY"
else
JAVA_BINARY="$JAVA_HOME/bin/java"
if [[ -f $JAVA_BINARY ]]; then
print "Found NonStop Java in $JAVA_BINARY"
else
print "NonStop Java has not been installed on the system, please "
print "install NonStop Server for Java to the $JAVA_HOME directory "
print "and then run this script again. "
print ""
print "Exiting ... "
print ""
return 1
fi
fi
#
# Set G_HOMETERM to the terminal identifier on which standard
# output is displayed.
#