summaryrefslogtreecommitdiffstats
path: root/share/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'share/systemd')
-rw-r--r--share/systemd/container-auto.service (renamed from share/systemd/container-autostart.service)4
-rw-r--r--share/systemd/container@.service12
2 files changed, 14 insertions, 2 deletions
diff --git a/share/systemd/container-autostart.service b/share/systemd/container-auto.service
index 076aa41..e9addd7 100644
--- a/share/systemd/container-autostart.service
+++ b/share/systemd/container-auto.service
@@ -5,8 +5,8 @@ After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=/usr/bin/container-autostart
-#ExecStop=
+ExecStart=/usr/bin/container auto --start
+ExecStop=/usr/bin/container auto --stop
Delegate=yes
StandardOutput=syslog
StandardError=syslog
diff --git a/share/systemd/container@.service b/share/systemd/container@.service
new file mode 100644
index 0000000..0bd6766
--- /dev/null
+++ b/share/systemd/container@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description="Container: %i"
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/container start --name %i --nspawn
+ExecStartPost=/usr/bin/container start --name %i --start
+ExecStopPost=/usr/bin/container stop -n %i --clean
+KillMode=mixed
+
+[Install]
+WantedBy=multi-user.target