您当前的位置: 首页 > 

少林码僧

暂无认证

  • 2浏览

    0关注

    317博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

某个开机自启的服务无法启动导致系统无法启动故障解决

少林码僧 发布时间:2017-05-11 22:22:32 ,浏览量:2

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 
关注
打赏
1661398670
查看更多评论
立即登录/注册

微信扫码登录

0.0351s