Merge pull request #203 from Sniffleupagus/usr1-save-recovery

add mode parameter to agent._restart, and call agent._restart from US…
This commit is contained in:
Jayofelony
2024-09-08 21:04:46 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -270,9 +270,9 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
self._save_recovery_data()
pwnagotchi.reboot()
def _restart(self):
def _restart(self, mode='AUTO'):
self._save_recovery_data()
pwnagotchi.restart("AUTO")
pwnagotchi.restart(mode)
def _save_recovery_data(self):
logging.warning("writing recovery data to %s ...", RECOVERY_DATA_FILE)