From db9385b708953646b6e066fea9da1dccd778ecbb Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Fri, 15 Feb 2019 09:47:13 +0100 Subject: [PATCH] [FIX] IoT : Waiting for wifi connection This loop try to get "screen_url" from "URL_SERVER" So IoT Box need to be connected to the same network as "URL_SERVER". ( Inetrnet or locally ) If can not reach "URL_SERVER" he return a default screen_url When IoT Box is wired connected there are no problem. But with Wifi the wireless service take some time to by enabled. With this fix the loop wait 1 second on every loop. So if can not reach "URL_SERVER" in 30 seconds he return a default screen_url --- .../tools/posbox/overwrite_after_init/etc/xdg/openbox/autostart | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/xdg/openbox/autostart b/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/xdg/openbox/autostart index 96ea352c761..d7b5349a74f 100755 --- a/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/xdg/openbox/autostart +++ b/addons/point_of_sale/tools/posbox/overwrite_after_init/etc/xdg/openbox/autostart @@ -15,6 +15,7 @@ if [ -e /home/pi/odoo-remote-server.conf ] var=0 while [ ${var} -lt 30 ]; do var=$((var+1)) + sleep 1 status_code=$(wget ${URL_SERVER} --server-response 2>&1|grep 'HTTP/'|awk '{print $2}') if [ ${status_code} -eq 200 ] then