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
来源:CSDN
作者:Quincy379
链接:https://blog.csdn.net/qq_33733970/article/details/103779412