Linux – chkconfig on for arbitrary path program

bootcentoschkconfiglinux

Noramlly to add a start up program one have something like

 chkconfig httpd on

however how can I do this for a program that I need to start like

/usr/local/program/sbin/program

? I tried

chkconfig /usr/local/program/sbin/program on 

but it said

error reading information on service /usr/local/program/sbin/program: No such file or directory

Unfortunately all the example I found online is chkconfig [service name] on.

Best Answer

Read the chkconfig man page, specifically the --add section and the RUNLEVEL FILES section.