LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-19-2004, 02:49 PM   #1
Colmenares
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
How to setup shells to run when the server boots/shuts down?


Environment:

RH AS 2.1.
Intel Hardware

I need to include a script to bring up all of our databases after the server enters multi-user mode, and shut them down before leaving muti-user mode. I know that I need to place the files in the /etc/rc directory structure but have not found any Linux documentation to guide me. I have been reading the man rc entry for HP-UX but I'm not sure how valid it will be - and I can't go around rebooting the server!
If anybody can point me in the right direction as to where to find good documentation, I would appreciate it. I'll also take examples!!

Thanks,



Carlos

Last edited by Colmenares; 08-19-2004 at 02:57 PM.
 
Old 08-19-2004, 04:03 PM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
If you want something to run as you are entering multiuser mode, you simply have to add the commands, or a reference to the script into /etc/rc.d/rc.3

If you want something to run, or you want to explicitly kill something running as you are rebooting/shutting down, you would need to change each of those scripts as well, those can be found here:

rebooting: /etc/rc.d/rc.6
shutting down: /etc/rc.d/rc.0

Needless to say, to edit these, you must be root.

Good Luck!
 
Old 08-19-2004, 04:04 PM   #3
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
If you want something to run when you boot up simply add command line to your /etc/rc.d/rc.local file - it's the last file to run and it's specifically for you to use to start apps on boot.
 
  


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
Making shells run at startup? Tuxluver Fedora 3 02-19-2005 02:57 PM
Slackware 10.0 Boots, But Setup cant detect CDROM Terei Slackware - Installation 8 02-02-2005 02:13 PM
apache server shuts down for unknown reason jordanthompson Linux - Software 3 01-18-2005 09:15 PM
etc/profile.local setup for different shells breenbaron Linux - General 0 03-31-2004 02:45 AM
program to run whne system shuts down jayakrishnan Linux - General 1 10-15-2003 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:01 AM.

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