LinuxQuestions.org
Review your favorite Linux distribution.
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 03-13-2011, 09:43 PM   #1
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Rep: Reputation: 15
how to auto run script in startup


Hello Linux Guru's

I've created a sample.sh file which I manually run on a terminal in Centos 5.5, I just want to know how can I make it run automatically hen the centos box starts?
 
Old 03-13-2011, 10:46 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
You can add a command to execute that script to your rc.local file (should be /etc/rc.d/rc.local or /etc/rc.local), which will run it during bootup. Actually, if the script itself isn't that long, you could simply copy the contents of the sample.sh script into rc.local.
 
Old 03-13-2011, 11:31 PM   #3
struggled_newbie
Member
 
Registered: Sep 2009
Posts: 125

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by MS3FGX View Post
You can add a command to execute that script to your rc.local file (should be /etc/rc.d/rc.local or /etc/rc.local), which will run it during bootup. Actually, if the script itself isn't that long, you could simply copy the contents of the sample.sh script into rc.local.
Thanks Sir
 
  


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
how to auto run app on startup? babag Mandriva 2 05-09-2008 12:40 AM
auto startup script in AIX5.3,how to shipon_97 AIX 2 08-22-2007 11:59 AM
auto run programs at startup?? attila_66 Linux - Newbie 4 10-29-2005 07:01 PM
How to auto load a script on KDE startup kam_kenneth Linux - Newbie 2 05-03-2004 05:55 PM
Getting firewall script to auto-run at startup lrt2003 Linux - Newbie 2 04-25-2004 03:28 AM

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

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