LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Start service on startup (http://www.linuxquestions.org/questions/linux-server-73/start-service-on-startup-607613/)

VeeDubbs 12-18-2007 08:40 AM

Start service on startup
 
Hi all -

Kind of a newbish question here. We use a program called Airwave to help monitor all of our wireless APs. It is running on a cent os box. We have tivoli for our backup solution. I have the agent installed and it works fine - but I've had to reboot the machine a couple of times and every time I forget the agent does not start on startup; and I'm not exactly sure how to do this. This is how I start the agent manually:

Code:

cd /opt/tivoli/tsm/client/ba/bin
nohup ./dsmc sched &
nohup ./dsmadmc &

How would I go about throwing this into startup? Do I have to do something in /etc/init.d/ ??

Thanks!

acid_kewpie 12-18-2007 09:05 AM

just add those lines to /etc/rc.local. no need for the nohup in rc.local either, not that that really matters.

VeeDubbs 12-18-2007 09:10 AM

There does not appear to be an /etc/rc.local. I have /etc/rc0.d through rc6.d. Is there no rc.local because this is a Cent OS box?

Thanks for the reply!

acid_kewpie 12-18-2007 09:47 AM

just create it. on my centos5 boxes it's a symlink to /etc/rc.d/rc.local, and that is just set as rights of 755.

VeeDubbs 12-19-2007 08:27 AM

Thanks acid -

I just put the lines in /etc/rc.d/rc.local and it seemed to work fine. Thanks!

You mention I did not need the nohup, why is that?

And would this be the case for any linux distro for starting a service on startup? Or is this just a Cent OS thing?

THanks again!

acid_kewpie 12-19-2007 09:23 AM

nohup stops a service dying when the controlling shell dissapears, i.e. you close a terminal window. from rc.local that is run via the init process, so never terminates until the OS itself is shut down.

rc.local is a redhat invention. as such it covers redhat, fedora and all redhat derivates back to a point of diversion... suse was originally base on redhat way back, so might be in there etc.. not sure.

reddazz 12-19-2007 10:33 AM

Quote:

... suse was originally base on redhat way back, so might be in there etc.. not sure.
It was originally based on Slack, but later on incorporated lots of stuff from Red Hat and other distros. The file to start local services on SUSE is /etc/init.d/boot.local.

acid_kewpie 12-19-2007 01:31 PM

ooh get you....


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