Last active
February 21, 2016 18:50
-
-
Save tvon/b825eb07602824cad125 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
NGINX=/usr/sbin/nginx | |
DIRECTIVES="worker_processes 1; pid /var/run/nginx-${USER}.pid; error_log /dev/null;" | |
# nginx attempts to write to the default logfile location despite the passed directive, so grep those errors out | |
# (note that I may just be doing something stupid and not properly setting the directive) | |
$NGINX -t -c $1 -g "$DIRECTIVES" 2>&1 | grep -v '^nginx: ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment