systemd: Switch virtnetworkd 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 19:49:05 +02:00
parent 22d218d51c
commit 78f2a26a94
3 changed files with 3 additions and 30 deletions

View File

@ -62,11 +62,8 @@ if conf.has('WITH_NETWORK')
virt_daemon_units += {
'service': 'virtnetworkd',
'service_in': files('virtnetworkd.service.in'),
'name': 'Libvirt network',
'socket_in': libvirtd_socket_in,
'socket_ro_in': libvirtd_socket_ro_in,
'socket_admin_in': libvirtd_socket_admin_in,
'service_extra_in': files('virtnetworkd.service.extra.in'),
}
openrc_init_files += {

View File

@ -0,0 +1,2 @@
[Service]
KillMode=process

View File

@ -1,26 +0,0 @@
[Unit]
Description=Virtualization network daemon
Conflicts=libvirtd.service
Requires=virtnetworkd.socket
Requires=virtnetworkd-ro.socket
Requires=virtnetworkd-admin.socket
After=network.target
After=dbus.service
After=apparmor.service
Documentation=man:virtnetworkd(8)
Documentation=https://libvirt.org
[Service]
Type=notify
Environment=VIRTNETWORKD_ARGS="--timeout 120"
EnvironmentFile=-@initconfdir@/virtnetworkd
ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
KillMode=process
[Install]
WantedBy=multi-user.target
Also=virtnetworkd.socket
Also=virtnetworkd-ro.socket
Also=virtnetworkd-admin.socket