Startup script failing at bootup, works when logged on
I am running RHEL3 update 6, and am attempting to create a shell script to start a process on this box at startup. I am booting to runlevel 3, have linked the scripts and all looks as though it runs but the service never starts. If I run this exact same script logged on as root it fires up just fine
case "$1" in
echo -n "Starting FOCUS: "
su - $FOCUS_USER -c "nohup $FOCUS_HOME/edastart > $FOCUS_HOME/edastart.out &" #this is on one line with the above line
echo "OK, FOCUS is started"
echo -n "Stopping FOCUS: "
su - $FOCUS_USER -c "$FOCUS_HOME/edastart -stop"
echo "OK, FOCUS is stopped"
echo "Usage: $0 start|stop|restart|reload"
I am running it with the S99 prefix to guarantee that it is the absolute last script that runs. As you can see the output is redirected to a file named edastart.out in the $FOCUS_HOME directory, this file is overwritten with nothing in it, it remains at a 0 byte count. When started after login this file has text and can be displayed using cat........is there something silly that I am missing?