LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to make file run at bootup (https://www.linuxquestions.org/questions/linux-general-1/how-to-make-file-run-at-bootup-518541/)

jolly 01-11-2007 11:10 PM

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

rylan76 01-12-2007 12:24 AM

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

?

fotoguy 01-12-2007 10:11 PM

Also make sure that run.sh is executable as well

Code:

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


All times are GMT -5. The time now is 05:23 PM.