Don't reboot a container when its configuration changes

Instead, just run "switch-to-configuration" inside the container.
This commit is contained in:
Eelco Dolstra 2014-03-17 15:03:29 +01:00
parent 511b86d22d
commit ef8e0266a2

View file

@ -132,6 +132,14 @@ with pkgs.lib;
done
fi
'';
reloadIfChanged = true;
serviceConfig.ExecReload =
"${pkgs.bash}/bin/bash -c '"
+ "echo ${container.path}/bin/switch-to-configuration test "
+ "| ${pkgs.socat}/bin/socat unix:${container.root}/var/lib/root-shell.socket -'";
}) config.systemd.containers;
};