Typically I just go into /etc/rc.d/init.d and copy script to postgresql and edit it so that it issues the postgres startup and stop commands. Postgres is a little weird in this respect, because you actually start and stop the postmaster. If you study several scripts in the /etc/rc.d/init.d directory, you'll probably understand pretty quickly how it should be done.