How to remove/backup script from /etc/init.d/?
Solution 1:
There are a couple ways. If you just want to do this temporarily, you can remove the execute bit from the file:
$ chmod -x /etc/init.d/varnish
Then re-add it when appropriate:
$ chmod +x /etc/init.d/varnish
The "official" way in Ubuntu (as well as in Debian and other Debian derivatives), though, is to use the update-rc.d
command:
$ update-rc.d varnish disable
This will remove all of the symlinks from the /etc/rcX.d folders, which take care of starting and stopping the service when appropriate.
See the update-rc.d man page for more information.
Solution 2:
$ sudo update-rc.d -f servicename remove