1
0
Fork 0
mirror of https://gitlab.postmarketos.org/postmarketOS/pmaports.git synced 2025-07-13 16:49:46 +03:00
pmaports/extra-repos/systemd/systemd-services/system-nftables.service
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

14 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