Skip to content

Commit

Permalink
Added some more notes from the systemd service documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbn committed Feb 24, 2025
1 parent 113ae10 commit be1813b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2205,3 +2205,5 @@ strconv
bitSize
DBeaver
allowPublicKeyRetrieval
systemd
freedesktop
27 changes: 27 additions & 0 deletions nginx/configure_automatic_restart.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,31 @@ Restart=always
RestartSec=5s
```

`RestartSec` defaults to: 100ms. Has to be configured with: `Restart`

I have no idea on how to test this at this time and I am still researching the root cause of the incident, but this was ready a nice extension to my configuration, which is just the default, since everything else is done it the site configuration for NginX.

Options for restart are:

- `no`
- `always`
- `on-success`
- `on-failure`
- `on-abnormal`
- `on-abort`
- `on-watchdog`

The follow matrix lifted from [systemd service man-page](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=)

| Exit causes/Restart settings | `no` | `always` | `on-success` | `on-failure` | `on-abnormal` | `on-abort` | `on-watchdog` |
|:--|:-:|:---:|:---:|:---:|:---:|:---:|:---:|
| Clean exit code or signal | | X | X | | | | |
| Unclean exit code | | X | | X | | | |
| Unclean signal | | X | | X | X | X | |
| Timeout | | X | | X | X | | |
| Watchdog | | X | | X | X | | X |

## Resources and References:

- [freedesktop.org: systemd service documentation](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart=)
- [freedesktop.org: systemd service documentation](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RestartSec=)

0 comments on commit be1813b

Please sign in to comment.