open-productive-stack/mailcow/data/Dockerfiles/clamd/clamdcheck.sh
2025-04-06 22:48:06 +02:00

14 lines
214 B
Bash

#!/bin/sh
set -eu
if [ "${CLAMAV_NO_CLAMD:-}" != "false" ]; then
if [ "$(echo "PING" | nc localhost 3310)" != "PONG" ]; then
echo "ERROR: Unable to contact server"
exit 1
fi
echo "Clamd is up"
fi
exit 0