Added delay after performing reboot operation

This commit is contained in:
Ashish D'Souza 2023-07-03 11:50:06 +10:00
parent 8df316f5fa
commit 9c882f7c83
1 changed files with 2 additions and 1 deletions

View File

@ -59,8 +59,9 @@ if __name__ == '__main__':
with open('/logs/connectivity.log', 'a') as log:
log.write(f'{datetime.now()} - Internet down, rebooting router\n')
router.reboot()
consecutive_downtime = 0
router.reboot()
sleep(120)
else:
consecutive_internet_downtime += 1
with open('/logs/connectivity.log', 'a') as log: