Results 1 to 6 of 6
Hi,
I need to start a program on bootup. I've read a little on the subject and I see different possibilities and I'm not sure which to use. I'm using ...
- 06-01-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 72
Starting program on bootup
Hi,
I need to start a program on bootup. I've read a little on the subject and I see different possibilities and I'm not sure which to use. I'm using Centos.
Should I put my program in etc/inittab?
Should I put it in etc/rc.d/rc.local?
Should I put a script it in /etc/rc.d/init.d?
Any advice or recommendation would be much appreciated.
Thank you.
olacelle
- 06-01-2009 #2
I take it you're talking about a background daemon. I'd start it in rc.local. That's what rc.local is for. The scripts in init.d need to follow quite complex conventions to make sure that they're bullet-proof, as you can see by looking at one of them. Best not to meddle with them!
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 06-01-2009 #3Just Joined!
- Join Date
- May 2009
- Posts
- 72
Yeah it's background daemon. I like the rc.local solution although it is not working at the moment. I simply added a line in /etc/rc.d/rc.local that looks like this:
/MyProgramPath/MyProgram
Now when I boot it hangs on a blue screen just before the username prompt.
I had to get by this by pressing 'I' on bootup (interactive) and answer 'N' when starting 'Local'. Is my synthax wrong?
Thanks
olacelle
- 06-01-2009 #4Just Joined!
- Join Date
- May 2009
- Posts
- 16
yes u can put it in /etc/rc.d/rc.local
- 06-02-2009 #5Linux User
- Join Date
- Jan 2006
- Posts
- 414
- 06-02-2009 #6Just Joined!
- Join Date
- May 2009
- Posts
- 72
That's what I was missing. It did the trick. Thanks a lot darkrose0510!
olacelle


Reply With Quote
