cd /etc/init.d/
vim testsrv
输入以下内容
#!/bin/bash
#chkconfig:2345 99 00
#description:this service is used for test
case $1 in
start)
echo 'the service is started'
touch /root/testsrv
;;
stop)
echo 'the service is stopped'
rm -f /boot/testsrv
;;
status)
[ -f /boot/testsrv ] && echo 'service testsrv is running...'||echo
某个开机自启的服务无法启动导致系统无法启动故障解决
关注
打赏