在CentOS6上想开机启动脚本
chkconfig --add ./service.sh
报错:
[root@XXX projects]# chkconfig --add service.sh
error reading information on service service.sh: No such file or directory
开启启动脚本必须放在 /etc/init.d/目录中
cp ./service.sh /etc/init.d/
重复执行:
[root@XXX projects]# chkconfig --add service.sh
service service.sh does not support chkconfig
启动脚本中必须添加注释标明启动级别
# chkconfig: 2345 10 90
网友评论