From 83d0b9ed90d41a173f9c5b0c34cf5303a118b81e Mon Sep 17 00:00:00 2001 From: dpeca Date: Tue, 23 Jun 2020 20:14:55 +0200 Subject: [PATCH] Allow quick restarting of nginx It can occur if domain has many aliases, and acme-challenge should be added many times This fix will prevent this error: ``` May 14 21:39:08 server systemd[1]: nginx.service: Start request repeated too quickly. May 14 21:39:08 server systemd[1]: nginx.service: Failed with result 'start-limit-hit'. ``` --- bin/v-restart-proxy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/v-restart-proxy b/bin/v-restart-proxy index 25ab20bf..1e5e98cb 100755 --- a/bin/v-restart-proxy +++ b/bin/v-restart-proxy @@ -50,7 +50,9 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then fi # Restart system -service $PROXY_SYSTEM restart >/dev/null 2>&1 +# service $PROXY_SYSTEM restart >/dev/null 2>&1 +systemctl reset-failed $PROXY_SYSTEM +systemctl restart $PROXY_SYSTEM > /dev/null 2>&1 if [ $? -ne 0 ]; then send_email_report check_result $E_RESTART "$PROXY_SYSTEM restart failed"