I want this script to run if the server is rebooted. I can run it from the command line and it starts fine. Could someone tell me what's wrong.
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
su - oracle -c /kw/01/app/oracle/product/9.2.0/mobile/server/bin/webtogo &
#else
#echo "Webtogo already started"
fi
Jesse