From The Compiler, 5 Years ago, written in INI.
Embed
  1. [Unit]
  2. Description=QEMU virtual machine
  3.  
  4. [Service]
  5. Environment="type=system-x86_64" "haltcmd=kill -INT $MAINPID"
  6. EnvironmentFile=/etc/conf.d/qemu.d/%i
  7. ExecStart=/usr/bin/qemu-${type} -name %i -nographic -runas qemu ${args}
  8. ExecStop=/bin/sh -c ${haltcmd}
  9. TimeoutStopSec=30
  10. WorkingDirectory=/home/qemu
  11.  
  12. [Install]
  13. WantedBy=multi-user.target
  14.