#!/bin/sh [[ -f ./setup ]] && source ./setup if ! nginx -q -t -c /etc/nginx/nginx.conf; then echo "Bad nginx configuration file" exit 1 fi exec 2>&1 # pipe stderr to stdout exec nginx -c /etc/nginx/nginx.conf -g 'daemon off;'