Created
June 3, 2014 20:10
-
-
Save rossta/56f762e1dae974c12576 to your computer and use it in GitHub Desktop.
nginx functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lsnginx() { | |
| ps -A -o pid,command | grep '[n]ginx' | |
| } | |
| startnginx() { | |
| sudo nginx -c /web/platform/config/nginx/nginx.conf | |
| } | |
| startnginxssl() { | |
| sudo nginx -c /web/platform/config/nginx/nginx.ssl.conf | |
| } | |
| stopnginx() { | |
| sudo kill -QUIT $( cat /var/run/nginx.pid ) | |
| } | |
| restartnginx() { | |
| lnginx | |
| echo "Restarting nginx..." | |
| stopnginx | |
| sleep 2 | |
| startnginx | |
| sleep 2 | |
| lnginx | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment