l sync-containers3: remove interface on container shutdown
This commit is contained in:
parent
501330a87c
commit
4d64e17557
@ -235,6 +235,13 @@ in {
|
||||
'';
|
||||
};
|
||||
}; }
|
||||
{ "container@${ctr.name}" = lib.mkIf ctr.runContainer {
|
||||
serviceConfig = {
|
||||
ExecStop = pkgs.writers.writeDash "remove_interface" ''
|
||||
${pkgs.iproute2}/bin/ip link del vb-${ctr.name}
|
||||
'';
|
||||
};
|
||||
}; }
|
||||
]) (lib.attrValues cfg.containers)));
|
||||
|
||||
systemd.timers = lib.mapAttrs' (n: ctr: lib.nameValuePair "${ctr.name}_syncer" {
|
||||
|
Loading…
Reference in New Issue
Block a user