Linux 开机自启动自定义脚本
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
还没有评论,来说两句吧...