1.編輯 /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
2.編輯 /etc/rc.local
#!/bin/bash
exit 0;
3.chmod a+x /etc/rc.local
4.systemctl enable rc-local
5.systemctl start rc-local
沒有留言:
張貼留言