Run a script at boot up
Say you wrote a script foobar.bash. Put that script in /etc/init.d and make sure it has executable writes (chmod +x foobar.bash).
Run the command below (note, you do not have to include /etc/init.d in the command, just the script you put in that directory)
$ update-rc.d foobar.bash defaults
You can check out
$ man update-rc.d
for more information. It is a Debian utility to install scripts. The option “defaults” puts a link to start FOO in run levels 2, 3, 4 and 5. (and puts a link to stop FOO into 0, 1 and 6.)
Also, to know which runlevel you are in, use the runlevel command.
http://ubuntu.wordpress.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/ »
[Click to add or edit comments])
Please prepend comments below including a date