modify to single docker image for clamav-rest

This commit is contained in:
Niilo Ursin 2017-08-28 23:18:08 +03:00
parent 6c8586f48e
commit 5784f5fc5f
2 changed files with 39 additions and 8 deletions

24
entrypoint.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
freshclam -d &
clamd &
sleep 20
/usr/bin/clamav-rest &
pids=`jobs -p`
exitcode=0
terminate() {
for pid in $pids; do
if ! kill -0 $pid 2>/dev/null; then
wait $pid
exitcode=$?
fi
done
kill $pids 2>/dev/null
}
trap terminate CHLD
wait
exit $exitcode