[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user