#!/bin/sh
#######################################################################
# Name : /etc/init.d/oraclesrv
# Purpose : Stop/start Orcale instance
# By : Yariv Sheizaf
# Date : 11-Sep-2001
#######################################################################
# Set ORACLE_OWNER
ORACLE_OWNER=oracle
if [ ! -f /public/scripts/dbstart.sh ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle Server:
# The following command assumes that the oracle login will not prompt the
# user for any values
echo Now start Oracle .....
su - $ORACLE_OWNER -c '/public/scripts/dbstart.sh >& /dev/null' &
echo Oracle startup ended.
;;
'stop')
# Stop the Oracle Server:
echo Now kill Oracle .....
su - $ORACLE_OWNER -c '/public/scripts/dbshut.sh >& /dev/null' &
echo Oracle shutdown ended.
;;
esac