Files
pmaports-rtwo/extra-repos/systemd/systemd-services/system-nftables.service
T
Clayton Craft bc35d9ddaf systemd/systemd-services: fix nftables unit (MR 5589) (MR 5563)
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
2025-01-10 13:02:35 +01:00

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