Better entrypoint

This commit is contained in:
Jeroen De Meerleer 2022-05-30 16:10:10 +02:00
parent 5e95266ea3
commit 730f5f2204
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
1 changed files with 11 additions and 1 deletions

View File

@ -145,4 +145,14 @@ chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $WEBCRON_ROOT/var
echo "Go!"
php $WEBCRON_ROOT/bin/console daemon &
exec apache2-foreground
wc_pid=$!
trap "kill $wc_pid 2> /dev/null" EXIT
exec apache2-foreground &
a2_pid=$!
trap "kill $a2_pid 2> /dev/null" EXIT
while kill -0 $wc_pid 2> /dev/null && kill -0 $a2_pid 2> /dev/null; do
sleep 5
done