clamav-rest/entrypoint.sh
2020-01-20 14:36:25 +01:00

23 lines
No EOL
304 B
Bash
Executable file

#!/bin/sh
freshclam -d &
clamd &
/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