Last active
November 10, 2016 23:25
-
-
Save magnetikonline/11017919 to your computer and use it in GitHub Desktop.
Nginx test/reload config bash scripts.
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
#!/bin/bash -e | |
PID="/run/nginx.pid" | |
if [[ ! -f $PID ]]; then | |
echo "Error: Nginx not currently running" >&2 | |
exit 1 | |
fi | |
kill -HUP $(cat $PID) |
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
#!/bin/bash -e | |
/usr/local/nginx/sbin/nginx -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment