File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -43,20 +43,23 @@ if [ -n "$key" ]; then
4343fi
4444
4545#
46- # Check if xvfb-run works and set up virtual display
46+ # xvfb-run
4747#
48- # Try to run xvfb-run with a test command
49- if xvfb-run --auto-servernum echo " xvfb-run is working!" ; then
50- USE_XVFB_RUN=true
51- else
52- echo " xvfb-run test failed, falling back to manual Xvfb setup"
53- USE_XVFB_RUN=false
48+ USE_XVFB=false
49+ if [ -z " $WHATSAPP_DEFAULT_ENGINE " ] || [ " $WHATSAPP_DEFAULT_ENGINE " = " WEBJS" ]; then
50+ # Try to run xvfb-run with a test command
51+ if xvfb-run --auto-servernum echo " xvfb-run is working!" ; then
52+ USE_XVFB=true
53+ else
54+ echo " xvfb-run test failed, do not run it"
55+ USE_XVFB=false
56+ fi
5457fi
5558
5659#
5760# Start your application using node with exec to ensure proper signal handling
5861#
59- if [ " $USE_XVFB_RUN " = " true" ]; then
62+ if [ " $USE_XVFB " = " true" ]; then
6063 exec xvfb-run --auto-servernum node dist/main
6164else
6265 exec node dist/main
You can’t perform that action at this time.
0 commit comments