Skip to content
Snippets Groups Projects
Select Git revision
  • a9f44745718b49f4cae4068a6ccc1e09cb810390
  • master default
  • feat/pull_changes
3 results

waitForNetwork

Blame
  • waitForNetwork 290 B
    #!/bin/bash
    
    while true
    do
        echo "1111ff 0.1" > /dev/rgb_pipe
        ping 8.8.8.8 -c 3 -W 15 -q > /dev/null
        res=$?
        if [ "$res" = "0" ]
        then
    	echo "Connection established"
    	echo "1111ff 3" > /dev/rgb_pipe
    	break
        else
    	echo "Connection failed"
        fi
        sleep 5
    done
    
    exit 0