I created a script called blueBoxT for starting and stopping Oracle and placed it in the /etc/init.d directory.
#!/bin/bash
echo "blueBoxT $1 - `date '+%Y%m%d%H%M'`" >> /root/blueBoxT.log
case "$1" in
'start')
echo "Starting Oracle"
su - oracle -c "/home/oracle/startDBT"
;;
'stop')
echo "Stopping Oracle"
su - oracle -c "/home/oracle/stopDBT"
;;
*)
echo "`basename $0`: usage: `basename $0` { stop | start }"
;;
esac
exit 0
I made the symbolic links as so...
root@dev /etc/rc.d
# find . -name *blueBox*
./rc2.d/K11blueBox
./rc6.d/K11blueBox
./init.d/blueBoxT
./rc1.d/K11blueBox
./rc3.d/S97blueBox
./rc0.d/K11blueBox
./rc5.d/S97blueBox
./rc4.d/S97blueBox
The log at /root/blueBoxT.log shows the start command and the Oracle instance is up.
The stop command never appears to get called. It is not in my log.
root@dev /root
# cat blueBoxT.log
blueBoxT start - 201008051323
blueBoxT start - 201008051327
blueBoxT start - 201008051346
blueBoxT start - 201008051356
I shutdown my Fedora 10 using the command...
shutdown -h now
What have I misconfigured to not be receiving the stop so that I can do an orderly shutdown of Oracle?