diff --git a/bin/test_nginx.sh b/bin/test_nginx.sh index 70933fc..29357fb 100755 --- a/bin/test_nginx.sh +++ b/bin/test_nginx.sh @@ -109,6 +109,7 @@ for role in ${WEB_ROLES[@]}; do then echo "Applying $state ..." >> "$out" salt-call --local state.apply "$state" >> "$out" + echo >> "$out" unset state break fi @@ -120,9 +121,12 @@ for role in ${WEB_ROLES[@]}; do create_fake_certs touch_includes $role - # test config file syntax + printf '\nTesting configuration ...\n' >> "$out" mispipe 'nginx -tq' "tee -a $out" || rolestatus=1 + printf '\nDumping configuration ...\n' >> "$out" + nginx -T >> "$out" + # make sure all vhost config files are named *.conf (without that suffix, they get ignored) for file in /etc/nginx/vhosts.d/* ; do test "$file" == "/etc/nginx/vhosts.d/*" && continue # skip loop if no file exists in vhosts.d/