remote: systemd: Remove unix sockets from filesystem when disabling a '.socket' unit
remote: systemd: Remove unix sockets from filesystem when disabling a '.socket' unit

The existence of the unix socket path is used by the remote driver to
determine whether modular daemons are in use, so if the socket file
stays behind and the user decided to switch from modular to monolithic
daemon which was socket activated, the remote driver will insist on
picking '/var/run/libvirt/virtqemud-sock', even when it's no longer in
use:

 # systemctl start libvirtd.service
 # virsh list
  Id   Name   State
 --------------------

 # systemctl stop libvirtd.service
 Warning: Stopping libvirtd.service, but it can still be activated by:
   libvirtd.socket
   libvirtd-ro.socket
   libvirtd-admin.socket
 # systemctl start virtqemud.socket
 # virsh list
  Id   Name   State
 --------------------

 # systemctl stop virtqemud.socket
 # systemctl start libvirtd.service
 # virsh list
 error: failed to connect to the hypervisor
 error: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': Connection refused

 # virsh -c 'qemu:///system?socket=/var/run/libvirt/libvirt-sock' list
  Id   Name   State
 --------------------

Fix this by instructing systemd to delete the socket file when
deactivating the unit file for the socket.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Ani Sinha <3f79ccd1432f8960aa9062d90665feabb5fd19d8@anisinha.ca>

olafhering/libvirt,libvirt/libvirt,zippy2/libvirt,crobinso/libvirt,zippy2/libvirt,libvirt/libvirt,olafhering/libvirt,crobinso/libvirt,zippy2/libvirt,libvirt/libvirt,jfehlig/libvirt,jfehlig/libvirt,olafhering/libvirt,olafhering/libvirt,crobinso/libvirt,crobinso/libvirt,jfehlig/libvirt,libvirt/libvirt,zippy2/libvirt,jfehlig/libvirt