power computing

Today I  knocked up a very basic init script for centos although I suspect it will work for other RH derivatives also.

It can be found at https://gist.github.com/1300467. Modify it to suit, rename it appropriately, place it in /etc/init.d. Test it works as expected with:

service some_website start
service some_website stop 
service some_website restart

and then turn it on

chkconfig some_website on 

This script has room for improvement, the first one would be to make plack run as a non privileged user.  But I am going to leave that for next time.


Thanks goes to the nginx startup script found at /etc/init.d/nginx ;)