clamav-rest/entrypoint.sh
2017-08-28 23:18:08 +03:00

24 lines
314 B
Bash
Executable file

#!/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