# Dirty hack to wait for network before starting kodi maxwait=20 sleeptime=3 i=0 while [ $i -lt $maxwait ] do numip=`ip address show dev eno1 | grep inet | grep -v inet6 | wc -l` if [ $numip == '1' ]; then totalwait=$(($i*$sleeptime)) echo "Slept for $totalwait seconds" break fi echo "Sleeping for $sleeptime seconds" sleep $sleeptime ((i++)) done #End of dirty hack