Skip to content

Commit e08bd29

Browse files
committed
update systemd override to include restart-catch
1 parent a9b0e04 commit e08bd29

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,21 @@ If you want to be even safer - you can add a config-validation inside the `nftab
123123
```text
124124
# /etc/systemd/system/nftables.service.d/override.conf
125125
[Service]
126+
# catch errors at start
126127
ExecStartPre=/usr/sbin/nft -cf /etc/nftables.conf
127128
129+
# catch errors at reload
128130
ExecReload=
129131
ExecReload=/usr/sbin/nft -cf /etc/nftables.conf
130132
ExecReload=/usr/sbin/nft -f /etc/nftables.conf
133+
134+
# catch errors at restart
135+
ExecStop=
136+
ExecStop=/usr/sbin/nft -cf /etc/nftables.conf
137+
ExecStop=/usr/sbin/nft flush ruleset
138+
139+
Restart=on-failure
140+
RestartSec=5s
131141
```
132142

133143
This will catch and log config-errors before doing a reload/restart.

0 commit comments

Comments
 (0)