mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Manually merge v1.4.24 into v2
This commit is contained in:
commit
df4e466fdf
6 changed files with 24 additions and 7 deletions
|
@ -58,6 +58,7 @@ VERBOSE = True
|
|||
DAEMON = False
|
||||
CREATEPID = False
|
||||
PIDFILE = None
|
||||
NOFORK = False
|
||||
|
||||
SCHED = BackgroundScheduler()
|
||||
SCHED_LOCK = threading.Lock()
|
||||
|
@ -1195,13 +1196,16 @@ def shutdown(restart=False, update=False, checkout=False):
|
|||
args += ARGS
|
||||
if '--nolaunch' not in args:
|
||||
args += ['--nolaunch']
|
||||
logger.info(u"Restarting PlexPy with %s", args)
|
||||
|
||||
# os.execv fails with spaced names on Windows
|
||||
# https://bugs.python.org/issue19066
|
||||
if os.name == 'nt':
|
||||
if NOFORK:
|
||||
logger.info('Running as service, not forking. Exiting...')
|
||||
elif os.name == 'nt':
|
||||
logger.info('Restarting PlexPy with %s', args)
|
||||
subprocess.Popen(args, cwd=os.getcwd())
|
||||
else:
|
||||
logger.info('Restarting PlexPy with %s', args)
|
||||
os.execv(exe, args)
|
||||
|
||||
os._exit(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue