LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2006, 10:19 AM   #1
Yig
Member
 
Registered: Aug 2005
Location: Montreal, Qc
Distribution: CentOs 4.5/5.0
Posts: 113

Rep: Reputation: 15
Modifying startup


Hi,

Which file do I have to modify so a script is executed when the server is powered on? In this case, I'd like Tomcat to start when the server is turned on.

Or is there a better way to do that?

Thanks!
 
Old 11-28-2006, 10:24 AM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Check out this link.
 
Old 11-28-2006, 10:31 AM   #3
Yig
Member
 
Registered: Aug 2005
Location: Montreal, Qc
Distribution: CentOs 4.5/5.0
Posts: 113

Original Poster
Rep: Reputation: 15
Anything more CentOS/Redhat specific?
 
Old 11-28-2006, 10:59 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
/etc/rc.local is executed on boot after the other init scripts.
 
Old 11-28-2006, 11:01 AM   #5
Yig
Member
 
Registered: Aug 2005
Location: Montreal, Qc
Distribution: CentOs 4.5/5.0
Posts: 113

Original Poster
Rep: Reputation: 15
Great. So I just need to put my startup in there.

Will this be executed if a user access the server using putty?
 
Old 11-28-2006, 11:28 AM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
/etc/rc.local is execute at boot time as root. This is not the same as running something at login time.

If you want to run something in the login shell of users, put it in the /etc/profile. This is the global file which is executed in the user's [bash] shell when they log in.

See the bash manual page, FILES section to see other files which are executed and when (e.g. on logout). By the way, I am assuming you're using bash for your user's interactive shell.
 
Old 11-28-2006, 02:30 PM   #7
Yig
Member
 
Registered: Aug 2005
Location: Montreal, Qc
Distribution: CentOs 4.5/5.0
Posts: 113

Original Poster
Rep: Reputation: 15
I only want something at boot time.

Thanks a lot man!
 
  


Reply



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
Modifying a patchfile judgex Programming 5 10-14-2006 01:21 AM
startup script modifying my XF86Config bads Linux - Newbie 5 09-07-2005 09:29 AM
Am I modifying the startup scripts correctly? BajaNick Linux - General 3 07-04-2004 01:26 PM
Something is modifying my modules.conf at startup abro Linux - Software 0 12-14-2003 07:50 PM
Modifying afterstep naima Programming 0 11-02-2001 08:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration