Fix bug in notnftables where dontFlush wasn't being respected

Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
magic_rb 2023-10-07 22:48:01 +02:00
parent 52d2b22844
commit 6175d518ce
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -10,7 +10,8 @@ let
optionalAttrs
listToAttrs
optional
filter;
filter
optionalString;
cfg = config.networking.notnft;
jsonFormat = (pkgs.formats.json {});
in
@ -115,7 +116,7 @@ in
RemainAfterExit = true;
ExecStart = startScript;
ExecReload = startScript;
ExecStop = "${pkgs.nftables}/bin/nft flush ruleset";
ExecStop = optionalString cfg.flush "${pkgs.nftables}/bin/nft flush ruleset";
};
};
};