fix: fixed reboot procedure (fixes #313)

This commit is contained in:
Simone Margaritelli
2019-10-17 13:42:05 +02:00
parent 13b1fb6d14
commit 79688305fd
2 changed files with 7 additions and 3 deletions

View File

@ -481,9 +481,7 @@ class Agent(Client, AsyncAdvertiser, AsyncTrainer):
def _reboot(self):
self.set_rebooting()
self._save_recovery_data()
logging.warning("rebooting the system ...")
os.system("/usr/bin/sync")
os.system("/usr/sbin/shutdown -r now")
pwnagotchi.reboot()
def next_epoch(self):
was_stale = self.is_stale()