update-rc.d updates the System V style init script links /etc/rcrunlevel.d/NNname whose target is the script /etc/init.d/name.
To set the start and kill priority we simply add them to the above update-rc.d command with the start priority first, followed by the kill priority.
update-rc.d apache2 defaults [START] [KILL] The below command will start mysql first, then apache2. On shutdown, the kill will be the reverse of the start with apache2 being killed first and mysql second.
update-rc.d apache2 defaults 90 90 update-rc.d mysql defaults 10 10 Because, in our example, both start and kill priorities are the same we can shorted the command to just
update-rc.d apache2 defaults 90 update-rc.d mysql defaults 10