[FIX] point_of_sale: don't launch Firefox before Odoo has started

When using Wi-Fi the Odoo instance on the POSBox will start after a
Wi-Fi connection is established. This takes a bit longer than when
you're using a wired connection. If Firefox gets started before you
end up with a 'Could not connect to localhost:8069' error.
This commit is contained in:
Joren Van Onder 2017-06-13 21:19:46 -07:00
parent 06141c34a5
commit 9f31e50ee9
No known key found for this signature in database
GPG Key ID: E42D0F1A086332F3
1 changed files with 8 additions and 1 deletions

View File

@ -3,4 +3,11 @@ xset s off
xset -dpms
export HOME=/tmp
/usr/bin/firefox http://localhost:8069/point_of_sale/display &
DISPLAY_URL='http://localhost:8069/point_of_sale/display'
# wait until odoo is ready, otherwise you will have to plug a
# keyboard into the posbox just to refresh firefox
until wget -q "${DISPLAY_URL}" -O /dev/null ; do sleep 1 ; done
/usr/bin/firefox "${DISPLAY_URL}" &