Skip to content

Instantly share code, notes, and snippets.

@minjindang
Created October 28, 2015 05:40
Show Gist options
  • Save minjindang/8c6aaff46361886e546d to your computer and use it in GitHub Desktop.
Save minjindang/8c6aaff46361886e546d to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
errors=$(/usr/local/php7/sbin/php-fpm --fpm-config /usr/local/php7/etc/php-fpm.conf -t 2>&1 | grep "\[ERROR\]" || true);
if [ -n "$errors" ]; then
echo "Please fix your configuration file…"
echo $errors
exit 1
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment