Skip to content

Commit

Permalink
Allow quick restarting of nginx
Browse files Browse the repository at this point in the history
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'.
```
  • Loading branch information
dpeca authored Jun 23, 2020
1 parent d9e9c64 commit 83d0b9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/v-restart-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

3 comments on commit 83d0b9e

@evs38
Copy link

@evs38 evs38 commented on 83d0b9e Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpeca This code is incompatible with CentOS 6 and other SystemV-based systems.

@wojsmol
Copy link
Contributor

@wojsmol wojsmol commented on 83d0b9e Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evs38 Please create new issue for this.

@dpeca
Copy link
Collaborator Author

@dpeca dpeca commented on 83d0b9e Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evs38
Fixed - eb5a045

Please sign in to comment.