[Unit]
Description=Xendomains - start and stop guests on boot and shutdown
Requires=proc-xen.mount xenstored.service
After=proc-xen.mount xenstored.service xenconsoled.service xen-init-dom0.service
After=network-online.target
After=remote-fs.target
ConditionPathExists=/proc/xen/capabilities
Conflicts=libvirtd.service

[Service]
Type=oneshot
RemainAfterExit=true
ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
ExecStart=-@LIBEXEC_BIN@/xendomains start
ExecStop=@LIBEXEC_BIN@/xendomains stop
ExecReload=@LIBEXEC_BIN@/xendomains restart

[Install]
WantedBy=multi-user.target
