Download this file
| 1 | # đŸ¤– Runs the self-test against the clamd that is running now. BindsTo makes it |
| 2 | # go inactive the moment clamd stops or restarts, and the TCP listener is bound |
| 3 | # to THIS unit, so the port follows the test, not the boot. |
| 4 | [Unit] |
| 5 | Description=Prove this clamd never answers OK for an over-limit archive |
| 6 | BindsTo=clamav-daemon.service |
| 7 | After=clamav-daemon.service |
| 8 | # Restarting this unit by hand after a failure reopens the port on a pass. |
| 9 | # Wants= adds no ordering; the socket orders itself after this unit. |
| 10 | Wants=scanner-tcp.socket |
| 11 | |
| 12 | [Service] |
| 13 | Type=oneshot |
| 14 | RemainAfterExit=yes |
| 15 | ExecStart=/usr/local/sbin/scanner-selftest |
| 16 | TimeoutStartSec=1800 |
| 17 | # A killed test leaves its fixtures (about 1.2 GB) behind in /var/tmp. A |
| 18 | # private /var/tmp goes with the unit. clamd never reads the fixture paths: |
| 19 | # every one is streamed. |
| 20 | PrivateTmp=yes |
| 21 | |
| 22 | [Install] |
| 23 | WantedBy=multi-user.target |
| 24 | |