summaryrefslogtreecommitdiff
path: root/qemu@.service.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-08-23 20:07:28 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-08-23 20:07:28 -0400
commitd31a16c435e497f320ccfa880122dff963f151a7 (patch)
tree35d5c3423f3f77743f2e89dee17cff88a9511d2b /qemu@.service.in
parent799e0edc196c4273b728b9f832d90dc79bbf8bbe (diff)
Organize in to an installable packagev20180714
Diffstat (limited to 'qemu@.service.in')
-rw-r--r--qemu@.service.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/qemu@.service.in b/qemu@.service.in
new file mode 100644
index 0000000..000419e
--- /dev/null
+++ b/qemu@.service.in
@@ -0,0 +1,16 @@
+[Unit]
+Description=Virtual Machine %I
+Documentation=man:qemu(1)
+PartOf=machines.target
+Before=machines.target
+
+[Service]
+Type=notify
+NotifyAccess=all
+RuntimeDirectory=qemu-%I
+PIDFile=@runstatedir@/qemu-%I/pid
+ExecStart=@BINPROG@ %I
+ExecStop=@SOCAT@ SYSTEM:'echo system_powerdown; sleep infinity' UNIX-CONNECT:@runstatedir@/qemu-%I/monitor.sock
+
+[Install]
+WantedBy=machines.target