summaryrefslogtreecommitdiff
path: root/units/systemd-nspawn@.service.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-29 12:38:26 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-29 17:00:05 +0100
commit6a140df0048c99e62339d97effbe16a1bba42d45 (patch)
treef73e885bd86466de5588e68d2521455fc60db5d8 /units/systemd-nspawn@.service.in
parent8fa844dccff70824ff063bfe5f409c47f5699d73 (diff)
units: rework systemd-nspawn@.service unit
- Unescape instance name so that we can take almost anything as instance name. - Introduce "machines.target" which consists of all enabled nspawns and can be used to start/stop them altogether - Look for container directory using -M instead of harcoding the path in /var/lib/container
Diffstat (limited to 'units/systemd-nspawn@.service.in')
-rw-r--r--units/systemd-nspawn@.service.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in
index e3eaa53239..02d663dd24 100644
--- a/units/systemd-nspawn@.service.in
+++ b/units/systemd-nspawn@.service.in
@@ -6,11 +6,13 @@
# (at your option) any later version.
[Unit]
-Description=Container %i
+Description=Container %I
Documentation=man:systemd-nspawn(1)
+PartOf=machines.target
+Before=machines.target
[Service]
-ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --directory=/var/lib/container/%i
+ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --machine=%I
KillMode=mixed
Type=notify
RestartForceExitStatus=133
@@ -18,4 +20,4 @@ SuccessExitStatus=133
Delegate=yes
[Install]
-WantedBy=multi-user.target
+WantedBy=machines.target