Skip to content

Commit

Permalink
Load /etc/nginx/default before testing $DAEMON
Browse files Browse the repository at this point in the history
If $DAEMON is tested before /etc/nginx/default is loaded then it effectively can't be overwritten.
  • Loading branch information
sturgill committed Apr 10, 2014
1 parent 59bc6f2 commit b7836d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nginx
Expand Up @@ -98,17 +98,17 @@ NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"
# Simple Tests
#------------------------------------------------------------------------------

# Include nginx defaults if available
if [ -f /etc/default/nginx ]; then
. /etc/default/nginx
fi

# Test if nginx is a file and executable
test -x $DAEMON || {
echo "$0: You don't have permissions to execute nginx." 1>&2
exit 4
}

# Include nginx defaults if available
if [ -f /etc/default/nginx ]; then
. /etc/default/nginx
fi

#set exit condition
#set -e

Expand Down

0 comments on commit b7836d7

Please sign in to comment.