No restart after update (#2242)
This commit is contained in:
parent
1f453b6c13
commit
1bfe328a1b
2 changed files with 5 additions and 3 deletions
|
@ -1124,6 +1124,7 @@ class UiWebsocket(object):
|
|||
|
||||
import main
|
||||
main.update_after_shutdown = True
|
||||
main.restart_after_shutdown = True
|
||||
SiteManager.site_manager.save()
|
||||
main.file_server.stop()
|
||||
main.ui_server.stop()
|
||||
|
@ -1234,4 +1235,4 @@ class UiWebsocket(object):
|
|||
else:
|
||||
gevent.spawn(main.file_server.checkSites, check_files=False, force_port_check=True)
|
||||
|
||||
self.response(to, "ok")
|
||||
self.response(to, "ok")
|
||||
|
|
|
@ -38,8 +38,9 @@ def main():
|
|||
import update
|
||||
print("Updating...")
|
||||
update.update()
|
||||
print("Restarting...")
|
||||
restart()
|
||||
if main.restart_after_shutdown:
|
||||
print("Restarting...")
|
||||
restart()
|
||||
else:
|
||||
print("Shutting down...")
|
||||
prepareShutdown()
|
||||
|
|
Loading…
Reference in a new issue