diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-09-15 19:59:14 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-09-28 16:52:23 -0300 |
commit | e76ce03ad29b5582c4763d61a5acaed1aeba87e5 (patch) | |
tree | 483626d21a3c9d2714996651bf7d66587179ef65 /server | |
parent | 7591c95951e4618f7775c52340f4d170a1bdd961 (diff) |
[feat] conf for enabling db creation via custom sh
We can now use a custom script to create databases by setting a
parameter 'create_cmd' on soledad configuration.
This will set CouchServerState to use it on ensure_database.
Diffstat (limited to 'server')
-rw-r--r-- | server/src/leap/soledad/server/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/__init__.py b/server/src/leap/soledad/server/__init__.py index 1b795016..bb1c6db0 100644 --- a/server/src/leap/soledad/server/__init__.py +++ b/server/src/leap/soledad/server/__init__.py @@ -285,6 +285,7 @@ def load_configuration(file_path): """ conf = { 'couch_url': 'http://localhost:5984', + 'create_cmd': None } config = configparser.ConfigParser() config.read(file_path) @@ -303,7 +304,7 @@ def load_configuration(file_path): def application(environ, start_response): conf = load_configuration('/etc/leap/soledad-server.conf') - state = CouchServerState(conf['couch_url']) + state = CouchServerState(conf['couch_url'], create_cmd=conf['create_cmd']) # WSGI application that may be used by `twistd -web` application = GzipMiddleware( SoledadTokenAuthMiddleware(SoledadApp(state))) |