diff options
author | Simo Sorce <simo@redhat.com> | 2015-05-26 16:56:47 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-05-26 16:56:47 -0400 |
commit | 3312c70e87f4137dba3ec2175e9f90b69b918246 (patch) | |
tree | a909cac50a4116f7b6b4deacd9099909ecb533d7 /custodia | |
parent | 62a302e6676a5ac113eee6143c8bcf6418f28b84 (diff) | |
download | custodia-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-x | custodia/custodia | 5 |
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() |