Search This Blog

Friday, March 4, 2011

Starting services at boot time

During start up or when changing runlevel, scripts are run from /etc/rcX.d/ where X is the runlevel number.

To execute your script at boot:

  • Write a script.
  • Put it in the /etc/init.d/ directory.
  • $> update-rc.d SCRIPT_NAME defaults
  • $> chmod +x SCRIPT_NAME

No comments:

Post a Comment

If you like this post, please leave a comment :)