#!/bin/sh
#chkconfig: 2345 80 05
#description: Oracle 8 Server
ORA_HOME=/usr/home/oracle/product/8.0.5
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
"start")
su-$ORA_OWNER -c $ORA_HOME/bin/dbstart
su-$ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
;;
"stop")
su-$ORA_OWNER -c $ORA_HOME/bin/dbshut
su-$ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
;;
esac