I am running CentOS 6 and I am trying to get my Oracle database to run at startup. I have been following these steps: http://www.oracle-base.com/articles/linux/automating-database-startup-and-shutdown-on-linux.php(Oracle 11gR2 portion at bottom)I have created this script and it is saved as /etc/init.d/dbora:#!/bin/bash# chkconfig: 345 99 10# description: Oracle auto start-stop script.# # Set ORA_OWNER to the user id of the owner of the# Oracle database software.ORA_OWNER=oraclecase $1 in    'start')    # Start the Oracle databases:    # The following command assumes that the oracle login    # will not prompt the user for any values    # Remove & if you don't want startup as a background process.    su $ORA_OWNER -c /home/oracle/scripts/startup.sh >> /home/oracle/scripts/startup_shutdown.log 2>&1 &    touch /var/lock/subsys/dbora    ;;'stop')    # Stop the Oracle databases:    # The following command assumes that the oracle login    # will not prompt the user for any values    su $ORA_OWNER -c /home/oracle/scripts/shutdown.sh >> /home/oracle/scripts/startup_shutdown.log 2>&1    rm -f /var/lock/subsys/dbora    ;;esacNext, I ran:chmod 750 /etc/init.d/dboraAs per the instructions.Finally, I added the script using chkconfig.chkconfig --add dboraI also added the scripts that the dbora file calls.I am able to start the database using:/etc/init.d/dbora startHowever, service dbora startdoes not work.Any ideas?
Can Start Service With init.d script, however doing service  start does not work
centos;scripting;startup
The main difference between runnning /etc/init.d/foo start and service foo start, is that service runs the init script in a clean environment. If you have a case where running the init script directly works, but does not with service, the an environment variable is being used in the startup that you have not manually initialized inside of the script. Since your init script is really simple, the environment variable usage is likely in the /home/oracle/scripts/startup.sh script.Also note that if it does not run with service, it will not properly start on boot.