What is needed for a linux service to be supported by chkconfig?

Solution 1:

The script must have 2 lines:

# chkconfig: <levels> <start> <stop>
# description: <some description>

for example:

# chkconfig: 345 99 01
# description: some startup script

345 - levels to configure
99 - startup order
01 - stop order

After you add the above headers you can run chkconfig --add <service>.

Solution 2:

While katriel has already answered this with the bare minimum needed to create an init script, I think you'd also be well served with looking at /etc/init.d/skeleton and using that as a template on which to base your init script. You'll end up with a much more consistent and readable script.