Unfortunately, init scripts tend to be dependent on the distribution (i.e. Debian vs. Red Hat), though they work approximately the same way. For example, on Red Hat systems, common functions are provided by
chkconfig is used to set which services start with the system (
chkconfig also reads some specially-formatted comments at the top of init scripts).