networking/nftables: only delete our tables if flushRuleset is set to false
This commit is contained in:
parent
d5a0826686
commit
5f300ad70c
|
@ -248,7 +248,11 @@ in
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
ExecStart = rulesScript;
|
ExecStart = rulesScript;
|
||||||
ExecReload = rulesScript;
|
ExecReload = rulesScript;
|
||||||
ExecStop = "${pkgs.nftables}/bin/nft flush ruleset";
|
ExecStop = "${pkgs.nftables}/bin/nft ${
|
||||||
|
if cfg.flushRuleset then "flush ruleset"
|
||||||
|
else escapeShellArg (concatStringsSep "; " (
|
||||||
|
mapAttrsToList (_: table: "delete table ${table.family} ${table.name}") enabledTables
|
||||||
|
))}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue