How to write a System V init script to start, stop, and restart my own application or service?