mirror of
https://github.com/Screenly/Anthias.git
synced 2025-12-23 22:38:05 -05:00
23 lines
397 B
Python
23 lines
397 B
Python
from __future__ import print_function, unicode_literals
|
|
|
|
import time
|
|
from builtins import range
|
|
|
|
import sh
|
|
|
|
|
|
# wait for default route
|
|
def is_routing_up():
|
|
try:
|
|
sh.grep(sh.route(), 'default')
|
|
return True
|
|
except sh.ErrorReturnCode_1:
|
|
return False
|
|
|
|
|
|
for _ in range(1, 30):
|
|
if is_routing_up():
|
|
break
|
|
print('Waiting for to come up...')
|
|
time.sleep(1)
|