Run some script at startup

  1. Copy your script(e.g myscript.sh) into the directory /etc/init.d/.
  2. Run
        update-rc.d myscript.sh defaults
     
  3. That is it! Everytime Debian started, it will run myscript.sh.