# 🤖 Runs the self-test against the clamd that is running now. BindsTo makes it # go inactive the moment clamd stops or restarts, and the TCP listener is bound # to THIS unit, so the port follows the test, not the boot. [Unit] Description=Prove this clamd never answers OK for an over-limit archive BindsTo=clamav-daemon.service After=clamav-daemon.service # Restarting this unit by hand after a failure reopens the port on a pass. # Wants= adds no ordering; the socket orders itself after this unit. Wants=scanner-tcp.socket [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/sbin/scanner-selftest TimeoutStartSec=1800 # A killed test leaves its fixtures (about 1.2 GB) behind in /var/tmp. A # private /var/tmp goes with the unit. clamd never reads the fixture paths: # every one is streamed. PrivateTmp=yes [Install] WantedBy=multi-user.target