Getting shell script to run as a daemon on CentOS?

view story

http://serverfault.com – EDIT: For some reason half of my post got truncated, not sure what happened. I will update soon and will post that it is updated here at the top. EDIT: I have updated the post again, sorry for the incomplete question. I've never written a shell or a bash script in my life. I'm trying to get RhodeCode installed on CentOS, and there are init scripts for Debian and Gentoo, but not for RedHat/CentOS which is insane to me. So I need to write one because our server environment is restricted to running CentOS 5. The source for the project can be found at Bitbucket here. The idea is to run Rh (HowTos)