sync-containers3: remove interface at container shutdown to avoid stuck containers
This commit is contained in:
parent
c660bedbb9
commit
3c84e73710
@ -246,6 +246,9 @@ in {
|
||||
}; }
|
||||
{ "container@${ctr.name}" = lib.mkIf ctr.runContainer {
|
||||
serviceConfig = {
|
||||
ExecStop = pkgs.writers.writeDash "remove_interface" ''
|
||||
${pkgs.iproute2}/bin/ip link del vb-${ctr.name}
|
||||
'';
|
||||
ExecStartPost = [
|
||||
(pkgs.writers.writeDash "bind-to-bridge" ''
|
||||
${pkgs.iproute2}/bin/ip link set "vb-$INSTANCE" master ctr0
|
||||
|
Loading…
Reference in New Issue
Block a user