systemd: Switch virtxend to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Andrea Bolognani 2023-09-19 20:32:50 +02:00
parent 540d5b9691
commit c8b11f2724
4 changed files with 16 additions and 37 deletions

View File

@ -66,12 +66,9 @@ if conf.has('WITH_LIBXL')
virt_daemon_units += {
'service': 'virtxend',
'service_in': files('virtxend.service.in'),
'name': 'Libvirt libxl',
'socket_in': libvirtd_socket_in,
'socket_ro_in': libvirtd_socket_ro_in,
'socket_admin_in': libvirtd_socket_admin_in,
'deps': 'ConditionPathExists=/proc/xen/capabilities',
'service_extra_in': files('virtxend.service.extra.in'),
'socket_extra_in': files('virtxend.socket.extra.in'),
}
openrc_init_files += {

View File

@ -0,0 +1,12 @@
[Unit]
Wants=virtlockd.socket
After=remote-fs.target
After=xencommons.service
Conflicts=xendomains.service
ConditionPathExists=/proc/xen/capabilities
[Service]
KillMode=process
[Install]
Also=virtlockd.socket

View File

@ -1,32 +0,0 @@
[Unit]
Description=Virtualization xen daemon
Conflicts=libvirtd.service
Requires=virtxend.socket
Requires=virtxend-ro.socket
Requires=virtxend-admin.socket
Wants=virtlockd.socket
After=network.target
After=dbus.service
After=apparmor.service
After=remote-fs.target
After=xencommons.service
Conflicts=xendomains.service
Documentation=man:virtxend(8)
Documentation=https://libvirt.org
ConditionPathExists=/proc/xen/capabilities
[Service]
Type=notify
Environment=VIRTXEND_ARGS="--timeout 120"
EnvironmentFile=-@initconfdir@/virtxend
ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
KillMode=process
[Install]
WantedBy=multi-user.target
Also=virtlockd.socket
Also=virtxend.socket
Also=virtxend-ro.socket
Also=virtxend-admin.socket

View File

@ -0,0 +1,2 @@
[Unit]
ConditionPathExists=/proc/xen/capabilities