[Unit] Description=ImunifyAV Generic Sensor Sockets PartOf=imunify-antivirus.service [Socket] ListenStream=/var/run/defence360agent/generic_sensor.sock.2 SocketUser=root SocketGroup=root SocketMode=0770 DirectoryMode=0755 # According to docs https://www.freedesktop.org/software/systemd/man/systemd.socket.html # each socket should be connected to service. This directive connects socket to service # Earlier it was connected wia [Install]Alias= directive, but it does not work in ubuntu Service=imunify-antivirus.service [Install] WantedBy=sockets.target