Pass libnftables.so.1 path into python script

This commit is contained in:
yuri 2023-09-17 21:03:18 +02:00
parent ea11e41005
commit 03719f5bf8
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ in
after = [ "wireguard-wg0.service" ];
script = ''
${wireguard-nat-nftables}/bin/wireguard-nat-nftables.py ${config}
${wireguard-nat-nftables}/bin/wireguard-nat-nftables.py ${config} ${pkgs.nftables}/lib
'';
serviceConfig = {

View file

@ -15,7 +15,7 @@ def main():
wg_interface = config["wg_interface"]
pubkey_port_mapping = config["pubkey_port_mapping"]
nft = nftables.Nftables()
nft = nftables.Nftables(sys.argv[2] + "/libnftables.so.1")
nft.set_json_output(True)
nft.set_handle_output(True)