# 🤖 clamd on TCP, for the console. Open only behind a passed self-test. # # DefaultDependencies=no is load-bearing. A socket unit is ordered before # sockets.target by default, sockets.target before basic.target, and every # service (the self-test included) after basic.target. A socket that must also # come AFTER the self-test closes that loop, and systemd breaks an ordering # cycle by dropping a job, which could leave this port shut after a reboot. # So it opts out, restores what it still needs, and is started by # multi-user.target and by clamd's Wants=, never by sockets.target. [Unit] Description=clamd on TCP, open only behind a passed self-test DefaultDependencies=no After=sysinit.target Requires=scanner-selftest.service After=scanner-selftest.service BindsTo=scanner-selftest.service Conflicts=shutdown.target Before=shutdown.target [Socket] ListenStream=@PRIVATE_IP@:3310 # Binds even if the private address is not up yet at boot. FreeBind=yes [Install] WantedBy=multi-user.target