#!/bin/sh
# Set ORA_HOME to be equivalent to the ORACLE_HOME from which you wish to
# execute dbstart and dbshut
#
# Set ORA_OWNER to the user id of the owner of
# the Oracle database in the ORA_HOME
#
ORA_HOME=/u01/app/oracle/product/ora9ias/6iserver
ORA_OWNER=ora9ias
filename=/u05/ims/iliv/source/GENF0050.fmx

# Test if /u05 is mounted, if it is then we need to start Apache
# as we are running the Web Services
if [ -f $filename ]
then
echo File $filename exists - Executing Apache $1
else
echo File $filename does not exist - Skipping Apache $1
exit
fi

case "$1" in
'start')
# Start the Apache
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "/u05/vnc-3.3.4-solaris_2.5/vncstart"
su - $ORA_OWNER -c "apachectl start"
;;

'stop')
# Stop the Apache
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "apachectl stop"
su - $ORA_OWNER -c "/u05/vnc-3.3.4-solaris_2.5/vncserver -kill :13"
;;
esac
