#!/bin/sh # # dbora This scripts starts and shuts down the oracle databas # # chkconfig: 345 99 10 # description: This script calls the dbstart script to start Oracle # and dbshut to stop it # processname: oracle* # config: /etc/oratab # # Source function library. . /etc/rc.d/init.d/functions ORA_HOME=/u01/app/oracle/product/8.1.7.0.1 ORA_OWNER=oracle if [ ! -f $ORA_HOME/bin/dbstart ]; then echo Sorry... the $ORA_HOME/bin/dbstart script is missing echo Cannot start Oracle exit fi if [ ! -f $ORA_HOME/bin/oracle_startup ]; then echo Sorry... the $ORA_HOME/bin/oracle_startup script is missing echo Cannot start Oracle exit fi case "$1" in 'start') su - $ORA_OWNER -c $ORA_HOME/bin/oracle_startup ;; 'stop') su - $ORA_OWNER -c $ORA_HOME/bin/oracle_shutdown ;; esac