From 857ff2d8d7aa55c07bb2e07b7b3ee23c624c89f4 Mon Sep 17 00:00:00 2001 From: guenhter Date: Mon, 10 Sep 2018 10:31:58 +0200 Subject: [PATCH] Ensure that container can be restarted --- run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index d952cc4..7b6c1bf 100755 --- a/run.sh +++ b/run.sh @@ -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