LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-22-2007, 09:33 AM   #1
aneesali
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
Run Script on Startup


Hi All,

I have 4 scripts when my system is reboot i always start the script manually. I want these scripts run autometecly after system rebooting. I use CentOS 4. I did know where i copy the file and where i give command of script starting.
 
Old 06-22-2007, 09:47 AM   #2
apeculiaz
LQ Newbie
 
Registered: Nov 2005
Distribution: Previously red hat,fedora,gentoo,debian; Currently,ubuntu,cygwin,mandriva
Posts: 14

Rep: Reputation: 0
You can put your scripts under "/etc/init.d".
Then, create links to it in "/etc/rcX.d", where X is 1 to 5 depending on runlevel.
One more thing is the naming of the symlinks you created should be SXXurscripts when your link is pointed to /etc/init.d/urscripts. More important part of the name is SXX, where S means Start and XX is number such as 05, 20, 30, that determines order of execution.
You can find more about runlevel at http://en.wikipedia.org/wiki/Runlevel.
 
Old 06-23-2007, 02:55 PM   #3
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
You should probably just put those in the /etc/rc.local file. The rc.local is executed after all other init scripts, so you really should use this file if you want some other scripts to start.
 
  


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
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
Run Script at Startup?? usaf_sp SUSE / openSUSE 5 11-11-2005 02:43 PM
get a script to run on startup kram Debian 3 04-23-2005 03:23 PM
Run a script at startup iain.ross Linux - Newbie 8 08-27-2004 05:03 PM
How to run script on startup Angelis Linux - General 1 11-16-2003 06:45 AM


All times are GMT -5. The time now is 08:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration