Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two PHP scripts that I need to start on boot. I have a CentOS powered VPS, and I normally use the following command to start the scripts.

screen php scriptname.php

However, if the server crashes, how can I have the scripts start automatically on boot?

Thanks.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Add your command to /etc/rc.d/rc.local

share|improve this answer
    
And similary thread on linuxquestions.org: linuxquestions.org/questions/linux-general-1/… :) –  strangeman Jul 13 '11 at 3:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.