Answers:
有几种方法。如果只想暂时执行此操作,则可以从文件中删除执行位:
$ chmod -x /etc/init.d/varnish
然后在适当的时候重新添加它:
$ chmod +x /etc/init.d/varnish
不过,在Ubuntu(以及Debian和其他Debian衍生产品中)的“官方”方式是使用以下update-rc.d
命令:
$ update-rc.d varnish disable
这将从/etc/rcX.d文件夹中删除所有符号链接,这些符号链接将在适当时启动和停止服务。
有关更多信息,请参见update-rc.d手册页。
$ sudo update-rc.d -f servicename remove
update-rc.d
链接。该脚本必须已经删除。” manpages.ubuntu.com/manpages/xenial/zh/man8/update-rc.d.8.html/etc/rcrunlevel.d
/etc/init.d/name
chmod
是一个简单的解决方案!我开始阅读manpages.ubuntu.com/manpages/precise/man8/update-rc.d.8.html,并正在帮助我了解init。让我思考...我应该阅读更多手册。