Merge pull request #310 from guenhter/fix-restart
Ensure that container can be restarted
This commit is contained in:
4
run.sh
4
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
|
||||
|
||||
Reference in New Issue
Block a user