Small fixes for CLAMD Health Check
This commit is contained in:
parent
c948a6cdbc
commit
384307b35c
|
@ -117,6 +117,7 @@ COPY --from=builder "/clamav" "/"
|
|||
|
||||
# init
|
||||
COPY clamd.sh /clamd.sh
|
||||
COPY clamdcheck.sh /usr/local/bin/
|
||||
RUN chmod +x /sbin/tini
|
||||
|
||||
# healthcheck
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/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
|
Loading…
Reference in New Issue