diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-09-30 15:27:21 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-10-01 10:59:01 -0300 |
commit | 7a0dba8b7008aca8652f7b334352d9ca63cb2054 (patch) | |
tree | 247173a5d649e23202c5d13aebf2aeb71007b4c2 /server/pkg | |
parent | 4964eed77748d65df30847a5fe0a608a163af7e0 (diff) |
[feat] read netrc path from configuration file
netrc file was hardcoded inside create-user-db. Now it reads the path
from /etc/leap/soledad-server.conf as done on server process.
The new configuration property is called 'admin_netrc'.
Diffstat (limited to 'server/pkg')
-rwxr-xr-x | server/pkg/create-user-db | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/pkg/create-user-db b/server/pkg/create-user-db index 1a7e77a7..ae2f0f57 100755 --- a/server/pkg/create-user-db +++ b/server/pkg/create-user-db @@ -21,6 +21,7 @@ import netrc import argparse from leap.soledad.common.couch import CouchDatabase from leap.soledad.common.couch import is_db_name_valid +from leap.soledad.server import load_configuration description = """ @@ -30,7 +31,7 @@ This is meant to be used by Soledad Server. parser = argparse.ArgumentParser(description=description) parser.add_argument('dbname', metavar='user-d34db33f', type=str, help='database name on the format user-{uuid4}') -NETRC_PATH = '/etc/couchdb/couchdb-admin.netrc' +NETRC_PATH = load_configuration('/etc/leap/soledad-server.conf')['admin_netrc'] def url_for_db(dbname): |