Hi there, On Wed, 19 Sep 2018, Karl Pielorz wrote:
Is there any way to have the socket removed when clamd dies? (i.e. even due to a signal/failure?)
I do things like this with ad-hoc watchdog scripts running from cron. You could write a shell script, called from cron every few minutes or so, which sends 'PING' to the clamd socket and if it doesn't get the 'PONG' reply back within a reasonable time, then: /usr/bin/killall clamd; sleep n; rm -f /path/to/socket; /etc/init.d/clamd start or something like that. Even if a utility offers an ability to remove its own socket, if it's unreliable it probably won't do that reliably so I'd use a script like that anyway. Think carefully about what the 'reasonable time' might be. I've seen scans take minutes, you won't want for example to interrupt the scanning of a large document. Having said that, I've never had to do anything like that for clamd, which has been one of the more reliable daemons I've used (and I've used it for well over a decade). So something seems to be wrong, and I'll suggest you need to find out what that is rather than just fix the symptom - although you obviously need to do something in the interim to keep mail flowing. -- 73, Ged. _______________________________________________ clamav-users mailing list clamav-users@lists.clamav.net http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users Help us build a comprehensive ClamAV guide: https://github.com/vrtadmin/clamav-faq http://www.clamav.net/contact.html#ml