#!/bin/bash nginx -t || exit 1 if systemctl --quiet is-active nginx.service; then systemctl try-reload-or-restart nginx.service || exit 1 fi