zoukankan      html  css  js  c++  java
  • case编写的httpd简单启停脚本

                           case编写的httpd简单启停脚本                      

    #!/bin/bash
    HTTPD="/etc/init.d/httpd"
    . /etc/init.d/functions
    case "$1" in
            start)
                    $HTTPD start >& /dev/null
                    [ $? -eq 0 ] && action "httpd is startd" /bin/true ||
                    action "httpd is startd"/bin/false
    ;;
            stop)
                    $HTTPD stop >& /dev/null
                    [ $? -eq 0 ] && action "httpd is stopd" /bin/true ||
                    action "httpd is stopd"/bin/false
    ;;
            restart)
                    $HTTPD restart >& /dev/null
                    [ $? -eq 0 ] && action "httpd is restartd" /bin/true ||
                    action "httpd is restartd"/bin/false
    ;;
            *)
                    echo "$0 Usage {start stop restart}"
    esac
  • 相关阅读:
    申请奖励加分
    6.14
    6.11
    6.10
    6.9
    6.8
    6.7
    6.6
    6.5
    6.4
  • 原文地址:https://www.cnblogs.com/tangshengwei/p/5418235.html
Copyright © 2011-2022 走看看