Ensure that container can be restarted

This commit is contained in:
guenhter 2018-09-10 10:31:58 +02:00
parent 8e66736955
commit 857ff2d8d7

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