Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Red Hat Advanced Server 2.1 (script does not run on startup)

Status
Not open for further replies.

siswjh

MIS
Dec 6, 2001
63
US
I have a script below, that I would like to run on system startup or reboot. I have tried it in /etc/rc5.d and /etc/rc3.d the script is owned by root and is executable. I not sure what's wrong any help would be appreciated. The script will run fine from the command line.

Code:
#!/bin/bash

#This will set environment controls for Web to go and Start the processes.

webpid=`ps -ax|grep web|grep -v grep|gawk '{print $1}'`
if [[ -s $webpid ]]
then
echo "Webtogo already started"
else
ORACLE_BASE=/kw/01/app/oracle;export ORACLE_BASE
ORACLE_HOME=/kw/01/app/oracle/product/9.2.0;export ORACLE_HOME
ORACLE_SID=ora91;export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH
TNS_ADMIN=$ORACLE_HOME/networking;export TNS_ADMIN
JAVA13_HOME=/usr/java/jdk1.3.1_06;export JAVA13_HOME
PATH=$ORACLE_HOME:$ORACLE_HOME/bin:$PATH;export PATH
#echo $ORACLE_HOME
/kw/01/app/oracle/product/9.2.0/mobile/server/bin/webtogo &
#else
#echo "Webtogo already started"
fi

Thanks
Jesse
 
How are you starting from rc5 or rc3?

You can also start by putting into /etc/inittab or /etc/rc.d/rc.local

 
Thanks for the help everyone but I found a way to do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top