Restart after resetting git install

This commit is contained in:
JonnyWong16 2020-03-06 15:26:26 -08:00
parent 42e33a0468
commit 8d67cc4c5a
5 changed files with 18 additions and 13 deletions

View file

@ -2077,7 +2077,7 @@ def upgrade():
libraries.update_libraries_db_notify()
def shutdown(restart=False, update=False, checkout=False):
def shutdown(restart=False, update=False, checkout=False, reset=False):
webstart.stop()
# Shutdown the websocket connection
@ -2112,6 +2112,13 @@ def shutdown(restart=False, update=False, checkout=False):
except Exception as e:
logger.warn(u"Tautulli failed to switch git branch: %s. Restarting." % e)
if reset:
logger.info(u"Tautulli is resetting the git install...")
try:
versioncheck.reset_git_install()
except Exception as e:
logger.warn(u"Tautulli failed to reset git install: %s. Restarting." % e)
if CREATEPID:
logger.info(u"Removing pidfile %s", PIDFILE)
os.remove(PIDFILE)