Start/stop scripts for Oracle Applications



All scripts get kicked off from the "/etc/init.d/appshost_applications.sh"
that has links as follows:
-rwxr----- 1 root root 1316 Aug 23 07:27 /etc/init.d/appshost_application_control
lrwxrwxrwx 1 root root 38 Aug 23 13:34 /etc/rc1.d/K10appshost_application_control -> ../init.d/appshost_application_control
lrwxrwxrwx 1 root root 38 Aug 23 13:34 /etc/rc2.d/K10appshost_application_control -> ../init.d/appshost_application_control
lrwxrwxrwx 1 root root 38 Aug 23 13:34 /etc/rc3.d/S99appshost_application_control -> ../init.d/appshost_application_control
lrwxrwxrwx 1 root root 38 Aug 23 13:34 /etc/rc4.d/K10appshost_application_control -> ../init.d/appshost_application_control
lrwxrwxrwx 1 root root 38 Aug 23 13:34 /etc/rc5.d/S99appshost_application_control -> ../init.d/appshost_application_control
lrwxrwxrwx 1 root root 38 Aug 23 13:34 /etc/rc6.d/K10appshost_application_control -> ../init.d/appshost_application_control

The "appshost_applications.sh" start the "start_applications.sh" which is located in "/mnt/sol_stage/eb/scripts/start_stop" and logs all output to "/$ENVIRONMENT/log/start_stop"

for overview please see the graphics ...

There are two parts of the "start_applications.sh":

1. "RDBMS" part
1.1 set up the various needed variables, ensure that all log-files gets created in "/$ENVIRONMENT/log/start_stop", and
then kicks of the "start_db_part.sh"

2. "Apps" part
2.1 set up the various needed variables, ensure that all log-files gets created in "/$ENVIRONMENT/log/start_stop", and
kicks off "start_apps_part.sh"

The sequence for "stop_applications.sh" is exactly the same, apart for the fact that "Apps" gets run first and then the "RDBMS" part.

3. "start_db_part.sh"
3.1 set up the various needed variables, ensure that all log-files gets created in "/$ENVIRONMENT/log/start_stop", and
test for type of environment: single node, dual node or RAC. Dependent on type of environment the script will either:
1. for single-node: "start_local_before_db*.sh" scripts, start actual rdbms and listener(addbctl.sh and addlnctl.sh),
"start_local_after_db_*"
2. for dual node: "start_local_before_db*.sh" scripts, start actual rdbms and listener(addbctl.sh and addlnctl.sh),
(correction here: have to have "ssh" built in) and then "start_local_after_db_*.sh"
3. for RAC-nodes: loop through all necessary nodes, and then do a "ssh" to the node(NOTE: passphrases are ok, but initial
exchange have to be manual as there are no initial knowledge of all systems... could be fixed by the system guys,
but that is not likely to happen!), whereafter the sequence is for the single-node....
4. "start_apps_part.sh"
4.1