LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2004, 07:46 AM   #1
etcetera
Member
 
Registered: Aug 2004
Posts: 436

Rep: Reputation: 17
Adding startup scripts


I want to add a software package to startup scripts.
I know where it is located and what commands to run.
I would like to start it on run level 3.
 
Old 12-16-2004, 08:19 AM   #2
Frustin
Member
 
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
First off you want to put the script into /etc/init.d

then add a symlink in /etc/rc.d/rc3.d to /etc/init.d/<your script>

the symlink should, depending on when you want to start the script off, look something like this: S69foobar

The `S' means that it will start in this run level i.e. rc3. The number `69' is the numerical start position of your script. So if you have another script that is S68 then that will be run first.

If the script is a daemon then you will more than likely want to kill it when you shutdown/restart the computer so you will need to put another symlink in /etc/rc.d/rc6.d but instead of using an `S' use a `K' (for kill). Naturally your script should have cases in it so that it will know what to do.
 
  


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
Adding Startup Scripts kaplan71 SUSE / openSUSE 1 08-25-2005 10:52 PM
adding bootsplash scripts to bootup? microsoft/linux Debian 7 12-17-2004 09:44 AM
User adding scripts? evilchild Programming 3 11-21-2003 08:49 AM
startup scripts amphion Linux - Newbie 8 03-28-2003 01:39 PM
startup scripts mimi Linux - Newbie 6 04-26-2002 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:25 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