菜单

Debian 9 /etc/rc.local开机启动

2019年5月29日 - 未分类

root@debian9 ~ # cat /lib/systemd/system/rc.local.service
root@debian9 ~ # systemctl status rc-local

为了解决这个问题,需要我们手工添加一个/etc/rc.local文件

cat </etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0
EOF

然后赋予权限:chmod +x /etc/rc.local
启动接着rc-local服务:systemctl start rc-local
再次查看状态
root@debian9 ~ # systemctl status rc-local

发表评论

电子邮件地址不会被公开。 必填项已用*标注