Share your knowledge at the LQ Wiki.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 10-19-2005, 09:08 AM   #1
LQ Newbie
Registered: Oct 2005
Location: Cincinnati OH
Distribution: RedHat
Posts: 4

Rep: Reputation: 0
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"
$0 stop
$0 start
echo "Usage: $0 start|stop|restart|reload"
exit 1
exit 0

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 there something silly that I am missing?
Old 10-20-2005, 11:22 PM   #2
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Did you remember to turn it on in runlevel 3?

chkconfig --list | grep script_name_here


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what shell script runs only at bootup/startup pwhitey86 Mandriva 2 12-22-2004 11:13 PM
Bootup failing at partition check -help! MarkieC Linux - Newbie 4 09-21-2004 05:08 PM
*sigh* UT2003 STartup failing under MDK 9.1 WayneDV Linux - Games 2 10-22-2003 07:52 AM
Sound works when logged in as GUI root bmike1 Linux - Hardware 11 08-19-2003 10:32 PM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 09:34 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration