Script not being run during system startup
Greetings,
Not sure if this is the best forum to post this. What I have is a RedHat ES V4 server that's being set up as a Oracle Forms server. I have the following set up to start/stop the Oracle Forms:
-rwxr-xr-- 1 root root 922 Feb 21 10:47 /etc/init.d/oracle_applications
lrwxrwxrwx 1 root root 29 Feb 8 14:13 /etc/rc2.d/K99oracle_apps -> ../init.d/oracle_applications
lrwxrwxrwx 1 root root 29 Feb 8 14:13 /etc/rc3.d/S98oracle_apps -> ../init.d/oracle_applications
I can run the script manually and it works. Problem is the script doesn't run during system startup and I assume during system shutdown. The account is called ooracle with ksh as the shell plus the .profile prompts the user to enter an option of 1 or 2. So the script is set up to enter the appropriate option as follows:
Code:
#!/bin/sh
case "$1" in
start)
echo "Starting OEM Applications"
su -l ooracle -c'/SYSO/u01o/app/oracle/product/FRS1012/opmn/bin/opmnctl startall'<<++EOT++
1
++EOT++
su -l ooracle -c'/SYSO/u01o/app/oracle/product/FRS1012/bin/emctl start iasconsole'<<++EOT++
1
++EOT++
sleep 15
;;
stop)
echo "Stopping OEM Applications"
su -l ooracle -c'/SYSO/u01o/app/oracle/product/FRS1012/bin/emctl stop iasconsole'<<++EOT++
1
++EOT++
su -l ooracle -c'/SYSO/u01o/app/oracle/product/FRS1012/opmn/bin/opmnctl stopall'<<++EOT++
1
++EOT++
sleep 15
;;
status)
echo "Verifying OEM Applications"
su -l ooracle -c'/SYSO/u01o/app/oracle/product/FRS1012/opmn/bin/opmnctl status'<<++EOT++
1
++EOT++
;;
*)
echo "Usage: ora_apps {start|stop|status}"
exit 1
;;
esac
Any ideas why this won't work during system startup?
Thanks,
Vic