LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-18-2007, 09:40 AM   #1
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Rep: Reputation: 15
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!
 
Old 12-18-2007, 10:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
just add those lines to /etc/rc.local. no need for the nohup in rc.local either, not that that really matters.
 
Old 12-18-2007, 10:10 AM   #3
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
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!
 
Old 12-18-2007, 10:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
Old 12-19-2007, 09:27 AM   #5
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
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!
 
Old 12-19-2007, 10:23 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
Old 12-19-2007, 11:33 AM   #7
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
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.
 
Old 12-19-2007, 02:31 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
ooh get you....
 
  


Reply


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
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 02:59 PM
How to start an application/service in startup? lawrence_lee_lee Linux - Software 4 09-21-2007 03:57 AM
how to interrupt service at startup mehlkelm Linux - General 9 05-03-2003 11:35 AM
Running a service at startup correro Linux - General 14 02-18-2003 08:00 PM
Stopping a startup service MrJoshua Linux - General 1 05-15-2002 03:03 PM


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

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