Merge pull request #310 from guenhter/fix-restart
Ensure that container can be restarted
This commit is contained in:
commit
0c42fdd6b3
1 changed files with 3 additions and 1 deletions
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
|
||||
|
|
Loading…
Reference in a new issue