LIBVIRTD_UNIT_VARS = \
$(COMMON_UNIT_VARS) \
+ -e 's|[@]name[@]|Libvirt|g' \
+ -e 's|[@]service[@]|libvirtd|g' \
+ -e 's|[@]sockprefix[@]|libvirt|g' \
+ -e 's|[@]deps[@]||g' \
$(NULL)
libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status
[Unit]
-Description=Libvirt admin socket
-Before=libvirtd.service
-BindsTo=libvirtd.socket
-After=libvirtd.socket
+Description=@name@ admin socket
+Before=@service@.service
+BindsTo=@service@.socket
+After=@service@.socket
+@deps@
[Socket]
-# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
+# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
# when using systemd version < 227
-ListenStream=@localstatedir@/run/libvirt/libvirt-admin-sock
-Service=libvirtd.service
+ListenStream=@localstatedir@/run/libvirt/@sockprefix@-admin-sock
+Service=@service@.service
SocketMode=0600
[Install]
[Unit]
-Description=Libvirt local read-only socket
-Before=libvirtd.service
-BindsTo=libvirtd.socket
-After=libvirtd.socket
+Description=@name@ local read-only socket
+Before=@service@.service
+BindsTo=@service@.socket
+After=@service@.socket
+@deps@
[Socket]
-# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
+# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
# when using systemd version < 227
-ListenStream=@localstatedir@/run/libvirt/libvirt-sock-ro
-Service=libvirtd.service
+ListenStream=@localstatedir@/run/libvirt/@sockprefix@-sock-ro
+Service=@service@.service
SocketMode=0666
[Install]
[Unit]
-Description=Libvirt non-TLS IP socket
-Before=libvirtd.service
-BindsTo=libvirtd.socket
-After=libvirtd.socket
+Description=@name@ non-TLS IP socket
+Before=@service@.service
+BindsTo=@service@.socket
+After=@service@.socket
+@deps@
[Socket]
-# This must match the @sysconfdir@/libvirt/libvirtd.conf tcp_port setting
+# This must match the @sysconfdir@/libvirt/@service@.conf tcp_port setting
# when using systemd version < 227
ListenStream=16509
-Service=libvirtd.service
+Service=@service@.service
[Install]
WantedBy=sockets.target
[Unit]
-Description=Libvirt TLS IP socket
-Before=libvirtd.service
-BindsTo=libvirtd.socket
-After=libvirtd.socket
+Description=@name@ TLS IP socket
+Before=@service@.service
+BindsTo=@service@.socket
+After=@service@.socket
+@deps@
[Socket]
-# This must match the @sysconfdir@/libvirt/libvirtd.conf tls_port setting
+# This must match the @sysconfdir@/libvirt/@service@.conf tls_port setting
# when using systemd version < 227
ListenStream=16514
-Service=libvirtd.service
+Service=@service@.service
[Install]
WantedBy=sockets.target
[Unit]
-Description=Libvirt local socket
-Before=libvirtd.service
+Description=@name@ local socket
+Before=@service@.service
+@deps@
[Socket]
-# The directory must match the @sysconfdir@/libvirt/libvirtd.conf unix_sock_dir setting
+# The directory must match the @sysconfdir@/libvirt/@service@.conf unix_sock_dir setting
# when using systemd version < 227
-ListenStream=@localstatedir@/run/libvirt/libvirt-sock
-Service=libvirtd.service
+ListenStream=@localstatedir@/run/libvirt/@sockprefix@-sock
+Service=@service@.service
SocketMode=0666
[Install]