Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 434 Bytes

nginx.md

File metadata and controls

41 lines (33 loc) · 434 Bytes

Nginx脚本

#!/bin/bash
########################
# nginx shell script
########################

help() {
  cat <<EOF
Usage: rabbit start | stop | restart | status
EOF
}

if [ $# -lt 1 ];then
  help
  exit
fi

case "$1" in
start)

  systemctl start nginx.service
;;
stop)

  systemctl stop nginx.service
;;
restart)
 
  systemctl restart nginx.service
;;
status)
  
  systemctl status nginx.service
;;
*)
  help
;;
esac