Launch Xvfb only if needed

Resolve #794
This commit is contained in:
zstadler 2023-03-16 11:45:13 +02:00
parent 5aaa43a70c
commit 82c8e73a90

View file

@ -2,7 +2,8 @@
if ! which -- "${1}"; then
# first arg is not an executable
export DISPLAY=:99
Xvfb "${DISPLAY}" -nolisten unix &
# Launch Xvfb if needed
xdpyinfo --display "${DISPLAY}" >/dev/null 2>&1 || Xvfb "${DISPLAY}" -nolisten unix &
exec node /usr/src/app/ "$@"
fi