forked from Spacellary/ReVanced-Extended-Automated-Builder
-
Notifications
You must be signed in to change notification settings - Fork 12
/
entrypoint
29 lines (24 loc) · 765 Bytes
/
entrypoint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
## Ref: https://github.com/Ulyssedev/Rust-undetected-chromedriver/blob/7da3bea/xvfb.sh
## Set up the Display for XVFB server,
## to support running Chrome in headful mode
export DISPLAY=:99
function keepUpScreen() {
echo "Running keepUpScreen() [Xvfb Server]"
while true; do
sleep .25
if [ -z $(pidof Xvfb) ]; then
Xvfb $DISPLAY -screen $DISPLAY 1280x1024x24 -ac +extension GLX +render -noreset &
## PyVirtualDisplay is another alternative to manage
## running the server from the code itself.
fi;
done;
}
## Starting the XVFB server in background
keepUpScreen &
## Browser tests
# python src/browser/test.py
python main.py