[systemd-devel] [PATCH] units: use KillMode=process for systemd-nspawn at .service

Jonathan Liu net147 at gmail.com
Tue May 27 05:08:43 PDT 2014


This causes the container to shut down cleanly when the service is
stopped.
---
 units/systemd-nspawn at .service.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/units/systemd-nspawn at .service.in b/units/systemd-nspawn at .service.in
index ff36e90..6228345 100644
--- a/units/systemd-nspawn at .service.in
+++ b/units/systemd-nspawn at .service.in
@@ -11,6 +11,7 @@ Documentation=man:systemd-nspawn(1)
 
 [Service]
 ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=guest --directory=/var/lib/container/%i
+KillMode=process
 Type=notify
 
 [Install]
-- 
1.9.3



More information about the systemd-devel mailing list