summaryrefslogtreecommitdiffstats
path: root/custodia
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-05-26 16:56:47 -0400
committerSimo Sorce <simo@redhat.com>2015-05-26 16:56:47 -0400
commit3312c70e87f4137dba3ec2175e9f90b69b918246 (patch)
treea909cac50a4116f7b6b4deacd9099909ecb533d7 /custodia
parent62a302e6676a5ac113eee6143c8bcf6418f28b84 (diff)
downloadcustodia-3312c70e87f4137dba3ec2175e9f90b69b918246.tar.gz
custodia-3312c70e87f4137dba3ec2175e9f90b69b918246.tar.xz
custodia-3312c70e87f4137dba3ec2175e9f90b69b918246.zip
Add server_socket [global] configuration option
This allows admins to configure where the socket needs to be created ithout forcing to change the cwd of the daemon to the same place. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'custodia')
-rwxr-xr-xcustodia/custodia5
1 files changed, 4 insertions, 1 deletions
diff --git a/custodia/custodia b/custodia/custodia
index 4114a4f..2c1ccd1 100755
--- a/custodia/custodia
+++ b/custodia/custodia
@@ -101,6 +101,9 @@ if __name__ == '__main__':
cfgfile = source_config()
config = parse_config(cfgfile)
- address = os.path.join(os.getcwd(), 'server_socket')
+ if 'server_socket' in config:
+ address = config['server_socket']
+ else:
+ address = os.path.join(os.getcwd(), 'server_socket')
httpd = LocalHTTPServer(address, config)
httpd.serve()