This commit is contained in:
yumoqing 2022-04-07 15:02:41 +08:00
parent ed05d9c864
commit 8f903cc2cd

View File

@ -20,13 +20,14 @@ except:
pmp = None pmp = None
class ConfiguredServer: class ConfiguredServer:
def __init__(self,auth_klass=AuthAPI): def __init__(self,auth_klass=AuthAPI, workdir=None):
pp = ProgramPath() if workdir is None:
self.natpmp_loop = True pp = ProgramPath()
self.nat_heartbeat = False self.natpmp_loop = True
workdir = pp self.nat_heartbeat = False
if len(sys.argv) > 1: workdir = pp
workdir = sys.argv[1] if len(sys.argv) > 1:
workdir = sys.argv[1]
config = getConfig(workdir,{'workdir':workdir,'ProgramPath':pp}) config = getConfig(workdir,{'workdir':workdir,'ProgramPath':pp})
if config.databases: if config.databases:
DBPools(config.databases) DBPools(config.databases)