summaryrefslogtreecommitdiff
blob: 61eaee261c68c5b5ad2b4a3268bc1bdfaab3f42b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Unit]
Description=Store and restore nftables firewall rules
ConditionPathExists=/var/lib/nftables-rules-save
Before=network.target
Before=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/libexec/nftables/nftables.sh load /var/lib/nftables/rules-save
ExecStop=/usr/libexec/nftables/nftables.sh store /var/lib/nftables/rules-save

[Install]
WantedBy=basic.target