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.
Thanks
Jesse
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