标签:nginx重启脚本
重启脚本:
#!/bin/bash PID=`cat /usr/local/nginx/logs/nginx.pid` >/dev/null 2>&1 case $1 in start) /usr/local/nginx/sbin/nginx ;; stop) kill -TERM $PID ;; quit) kill -QUIT $PID ;; reload) kill -HUP $PID ;; restart) kill -TERM $PID /usr/local/nginx/sbin/nginx ;; status) elinks http://localhost -dump >/dev/null 2>&1 if [ $? -ne 0 ];then echo "nginx stop" else echo "nginx running" fi esac
标签:nginx重启脚本
原文地址:http://wupengfei.blog.51cto.com/7174803/1958135