Linux 开机自启动自定义脚本

冷不防 2023-06-26 10:36 25阅读 0赞

cd /etc/rc.d/init.d/
vim autof5.sh
chmod +x autof5.sh
chkconfig —add autof5.sh
chkconfig autof5.sh on
reboot

PS: autof5.sh shell脚本第二行必须要有,否则会报service autof5.sh does not support chkconfig

#!/bin/bash
# chkconfig: 2345 20 80
/usr/bin/python autof5.py

发表评论

表情:
评论列表 (有 0 条评论,25人围观)

还没有评论,来说两句吧...

相关阅读