-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·35 lines (29 loc) · 863 Bytes
/
start.sh
File metadata and controls
executable file
·35 lines (29 loc) · 863 Bytes
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
30
31
32
33
34
35
#!/bin/bash
set -e
# When docker restarts, this file is still there,
# so we need to kill it just in case
[ -f /tmp/.X99-lock ] && rm -f /tmp/.X99-lock
_kill_procs() {
kill -TERM $node
# kill -TERM $xvfb
}
# Relay quit commands to processes
trap _kill_procs SIGTERM SIGINT
# Xvfb :99 -screen 0 1024x768x16 -nolisten tcp -nolisten unix &
# xvfb=$!
#Set the desired version, fallback to latest
WA_AUTOMATE_VERSION="${W_A_V:-latest}"
export DISPLAY=:99
echo "Starting the application"
echo "Using version: $WA_AUTOMATE_VERSION"
echo $@
if [[ $@ == *"--no-update"* ]]; then
echo "Skipping update"
else eval "PUPPETEER_SKIP_DOWNLOAD=true npm i @open-wa/wa-automate@$WA_AUTOMATE_VERSION --ignore-scripts"
fi
exec node $@
# exec dumb-init -- node ./node_modules/@open-wa/wa-automate/bin/server.js $@
# node=$!
# echo "PID: $node"
# wait $node
# wait $xvfb