share it:
debian / ubuntu use update-rc.d command to add / disable boot entry
Description: common Linux
startup items is in /etc/rc.local
the exit 0
add startup scripts between statements,
We said here another way, using the update-rc.d
command to add / disable startup items, very good use.
use
#将脚本添加开机自启,先放入/etc/init.d文件夹,并给予可执行权限
mv xx.sh /etc/init.d
chmod +x /etc/init.d/xx.sh
#设置开机自启
update-rc.d xx.sh defaults
#删除开机自启
update-rc.d -f xx.sh remove
#如果你想禁止程序开机自启,比如apache2、nginx
update-rc.d -f apache2 remove
update-rc.d -f nginx remove
For some programs sometimes do not want to uninstall, do not want to boot, and quite used to this approach, you can also save CPU
utilization of resources.
Disclaimer: This article is the original article, copyright Rat's Blog all, please indicate the source!
This link: https://www.moerats.com/archives/577/