Blog Archive

Service does not support chkconfig

Adding Script to the Startup using chkconfig command

Well if you want to use chkconfig command for adding your script to the startup directories instead of manually creating the symbolic links then you have modify you script file before using the chkconfig command.

Add the following line below the #!/bin/bash in your script file
# chkconfig: 2345 80 20

This tells the chkconfig that the service should start at run levels 2, 3, 4 and 5 and be turned off for all other run levels. It should have a start priority of 80 and a stop priority of 20.You can change these values based on your service requirement and then run

chkconfig --add {name of your script file}