how to run a script at boot time?

cp file /etc/init.d/file

Change my example obove file with your scriptfile name.

chmod +x file

update-rc.d file defaults

to remove a script:

First you most remove the original script in /etc/init.d Then, to remove the links in /etc/rcrunlevel.d run (as root):

update-rc.d file remove

defaults is used, update-rc.d will make links to start the service in runlevels 2345, and stop the service in runlevels 016.

To start the script folding in runlevels 0123 and stop in 456, run (as root):

update-rc.d file start 0123 stop 456

0 Responses to “how to run a script at boot time?”


  1. No Comments

Leave a Reply