• Linux中service命令和/etc/init.d/的关系


    Linux中service命令和/etc/init.d/的关系
     
    service xxx启动 /etc/init.d/ 目录下的xxx脚本
    如一个脚本名为 mysvc保存在/etc/init.d/下可以用 service mysvc 运行mysvc脚本
    echo passed in option $0 $1
     
    if [ $1 = "start" ]
    then
            echo myservice started........................................
    elif [ $1 = "stop" ]
    then
            echo myservice stoped........................................
    else
            echo myservice not supported option........................................
    fi  www.2cto.com  
     
    [root@localhost init.d]# service mysvc start
    passed in option /etc/init.d/mysvc start
    myservice started........................................
     
    [root@localhost init.d]# service mysvc stop
    passed in option /etc/init.d/mysvc stop
    myservice stoped........................................
     
    [root@localhost init.d]# service mysvc xxx
    passed in option /etc/init.d/mysvc xxx
    myservice not supported option........................................
  • 相关阅读:
    checkbox美化
    JS 之简单计算器
    python实现简单用户认证和角色制授权
    搭建高性能web服务
    纯JS实现fadeIn 和fadeOut
    纯CSS实现气泡框
    javascript之对象(二)&& 继承问题
    JavaScript之对象(一)
    Web发展史
    [LeetCode 256] Paint House
  • 原文地址:https://www.cnblogs.com/lidabo/p/4231270.html
Copyright © 2020-2023  润新知