This commit is contained in:
Jeroen Oudshoorn
2024-01-07 14:23:10 +01:00
parent ff361848df
commit 868e7da834
2 changed files with 2 additions and 3 deletions

View File

@ -136,6 +136,7 @@ def restart(mode):
os.system("touch /root/.pwnagotchi-manual") os.system("touch /root/.pwnagotchi-manual")
os.system("service bettercap restart") os.system("service bettercap restart")
time.sleep(1)
os.system("service pwnagotchi restart") os.system("service pwnagotchi restart")

View File

@ -102,9 +102,7 @@ class Client(object):
except OSError: except OSError:
sleep_time = min_sleep + max_sleep * random.random() sleep_time = min_sleep + max_sleep * random.random()
logging.warning('connection to the bettercap endpoint failed...') logging.warning('connection to the bettercap endpoint failed...')
logging.warning('retrying connection in {} sec'.format(sleep_time)) pwnagotchi.restart("AUTO")
await asyncio.sleep(sleep_time)
continue
def run(self, command, verbose_errors=True): def run(self, command, verbose_errors=True):
while True: while True: