Friday, November 14, 2014

Linux Enable chkconfig

After creating a script in "/etc/init.d" to start/stop/restart a service, you will still need to use chkconfig to ensure that the process starts during server bootup.

To enable chkconfig, add the line in red at the top of the script in "/etc/init.d/"
#!/bin/sh

# chkconfig: 35 90 10

start(){
       # start the service here
}

# --- snipped ---


  • "35" means the service will be activated for runlevels 3 and 5
  • "90" means that the service will be started at priority 90 (bigger is later)
  • "10" means that the service will be stopped at priority 10

No comments:

Post a Comment