From 4ad27e0184b24d211c364f7d2b29452393bc7f71 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Thu, 9 Mar 2023 02:26:49 -0500 Subject: [PATCH] [O] nginx reload logic --- deploy.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 6cf3306..a685345 100755 --- a/deploy.sh +++ b/deploy.sh @@ -27,4 +27,9 @@ if [ -d "$DEPL.del" ]; then fi # Reload nginx -sudo nginx -t && sudo systemctl reload nginx +if sudo nginx -t; then + echo "Reloading nginx..." + sudo systemctl reload nginx +else + echo "[!!!] Nginx config is invalid, not reloading." +fi