modify to single docker image for clamav-rest
This commit is contained in:
parent
6c8586f48e
commit
5784f5fc5f
2 changed files with 39 additions and 8 deletions
24
entrypoint.sh
Executable file
24
entrypoint.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue