add check for config-dir parameter (bug1101129)
Change-Id: I5cd454cc3c5bf5da9656c05e9a22385ffcd01147
This commit is contained in:
parent
7691276b86
commit
a9d53dc93e
@ -85,8 +85,13 @@ if __name__ == '__main__':
|
|||||||
if CONF.debug:
|
if CONF.debug:
|
||||||
CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG)
|
CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG)
|
||||||
|
|
||||||
if not CONF.config_file:
|
if CONF.config_file:
|
||||||
print "No config files could be found."
|
paste_config = CONF.config_file[0]
|
||||||
|
else:
|
||||||
|
paste_config = CONF.find_file('keystone.conf')
|
||||||
|
if not paste_config:
|
||||||
|
print ("The keystone.conf file could not be found in the "
|
||||||
|
"configuration directories.")
|
||||||
CONF.print_help()
|
CONF.print_help()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@ -101,14 +106,14 @@ if __name__ == '__main__':
|
|||||||
eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
|
eventlet.patcher.monkey_patch(all=False, socket=True, time=True,
|
||||||
thread=monkeypatch_thread)
|
thread=monkeypatch_thread)
|
||||||
|
|
||||||
options = deploy.appconfig('config:%s' % CONF.config_file[0])
|
options = deploy.appconfig('config:%s' % paste_config)
|
||||||
|
|
||||||
servers = []
|
servers = []
|
||||||
servers.append(create_server(CONF.config_file[0],
|
servers.append(create_server(paste_config,
|
||||||
'admin',
|
'admin',
|
||||||
CONF.bind_host,
|
CONF.bind_host,
|
||||||
int(CONF.admin_port)))
|
int(CONF.admin_port)))
|
||||||
servers.append(create_server(CONF.config_file[0],
|
servers.append(create_server(paste_config,
|
||||||
'main',
|
'main',
|
||||||
CONF.bind_host,
|
CONF.bind_host,
|
||||||
int(CONF.public_port)))
|
int(CONF.public_port)))
|
||||||
|
Loading…
Reference in New Issue
Block a user