conf | conf | ||||
core/certbot | core/certbot | ||||
nginx-error.conf |
| tee "$out" >/dev/null | | tee "$out" >/dev/null | ||||
if ! sudo nginx -t; then | if ! sudo nginx -t; then | ||||
cp "$out" "../nginx-error.conf" | |||||
echo "Reverting to backup file." | echo "Reverting to backup file." | ||||
echo "Bad file saved to nginx-error.conf." | |||||
mv "$out.bak" "$out" | mv "$out.bak" "$out" | ||||
else | else | ||||
echo "Press enter to restart nginx." | echo "Press enter to restart nginx." |