LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2007, 11:10 PM   #1
jolly
Member
 
Registered: Mar 2001
Posts: 63

Rep: Reputation: 15
How to make file run at bootup


OS: CentOS 4.3
I have one file name run.sh in folder /home/httpd/www/
The content is below. When I reboot machine this file don't execute.
How can I make it execute whenever server is rebooted.


------------------------------------------------------------
#run.sh
nohup ./sc_serv sc_serv_shoutcasting.conf &
nohup ./sc_trans_linux sc_trans_shoutcasting.conf &
------------------------------------------------------------

Thanks
 
Old 01-12-2007, 12:24 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by jolly
OS: CentOS 4.3
I have one file name run.sh in folder /home/httpd/www/
The content is below. When I reboot machine this file don't execute.
How can I make it execute whenever server is rebooted.
How about appending

sh -f /home/httpd/www/run.sh

to

/etc/rc.local

?
 
Old 01-12-2007, 10:11 PM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Also make sure that run.sh is executable as well

Code:
chmod +x /home/httpd/www/run.sh
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make a simple script and make it run on bootup?? coolblue Programming 5 12-18-2006 09:55 PM
how to write a batch file to make a program run during boot up in windows??? b0nd Programming 7 09-04-2006 06:16 AM
Can't Configure Or run Make file Pretzels Linux - Software 4 01-26-2005 10:29 AM
How do i make scripts run at bootup and shutdown? BajaNick Linux - General 2 08-11-2003 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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