Merge pull request #310 from guenhter/fix-restart

Ensure that container can be restarted
This commit is contained in:
Petr Sloup 2018-09-13 16:25:16 +02:00 committed by GitHub
commit 0c42fdd6b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
run.sh
View file

@ -7,6 +7,8 @@ _term() {
trap _term TERM
# Delete files if they were not cleaned by last run
rm -rf /tmp/.X11-unix /tmp/.X99-lock
start-stop-daemon --start --pidfile ~/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
echo "Waiting 3 seconds for xvfb to start..."
@ -19,5 +21,5 @@ node /usr/src/app/ -p 80 "$@" &
child=$!
wait "$child"
start-stop-daemon --stop --pidfile ~/xvfb.pid # stop xvfb when exiting
start-stop-daemon --stop --retry 5 --pidfile ~/xvfb.pid # stop xvfb when exiting
rm ~/xvfb.pid