The type was erroneously set as 'simple', and since we are setting ExecStop we actually need to set RemainAfterExit to avoid running ExecStop when the oneshot service runs. This is because nft returns/ exits pretty much immediately after applying the config. fixes #2846
15 lines
315 B
Desktop File
15 lines
315 B
Desktop File
[Unit]
|
|
Description=nftables firewall used on pmOS
|
|
Wants=network-pre.target
|
|
Before=network-pre.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/sbin/nft -f "/etc/nftables.nft"
|
|
ExecReload=/usr/sbin/nft -f "/etc/nftables.nft"
|
|
ExecStop=/usr/sbin/nft flush ruleset
|
|
RemainAfterExit=yes
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|