Added "Reboot into AUTO mode" button in web ui

As requested in issue #502
This commit is contained in:
Edoardo Maria Elidoro
2019-11-03 22:57:32 +01:00
parent 04e551600d
commit dc2362c371
2 changed files with 32 additions and 2 deletions

View File

@ -112,3 +112,14 @@ def reboot():
logging.warning("rebooting ...")
os.system("sync")
os.system("shutdown -r now")
def reboot_into_auto():
logging.warning("rebooting into AUTO mode ...")
if view.ROOT:
view.ROOT.on_reboot()
# give it some time to refresh the ui
time.sleep(10)
os.system("touch /root/.pwnagotchi-auto")
os.system("sync")
os.system("shutdown -r now")