CentOS设置开机启动脚本
参考
步骤
- 编写要开机启动的脚本,这里我们假设这个脚本是
/root/wifi-init.sh - 执行如下命令将
/etc/rc.d/rc.local文标记为可执行文件
chmod +x /etc/rc.d/rc.local
- 打开/etc/rc.d/rc.local文件,在最后面添加
. /root/wifi-init.sh /root/wifi-init.sh/etc/rc.d/rc.local文标记为可执行文件chmod +x /etc/rc.d/rc.local
. /root/wifi-init.sh