Initialize PlexPy after daemonizing

This commit is contained in:
JonnyWong16 2016-01-31 15:13:35 -08:00
parent 3248e6500e
commit fae9bc618a

View file

@ -153,12 +153,12 @@ def main():
# Put the database in the DATA_DIR
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, 'plexpy.db')
# Read config and start logging
plexpy.initialize(config_file)
if plexpy.DAEMON:
plexpy.daemonize()
# Read config and start logging
plexpy.initialize(config_file)
# Force the http port if neccessary
if args.port:
http_port = args.port