diff options
| author | Barry Warsaw | 2012-10-24 19:25:17 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-10-24 19:25:17 -0400 |
| commit | 3189b984e68fafdffba8a5ee57816902eafd5f91 (patch) | |
| tree | 768acee2c181047ac9149122c4a21c90037be899 /src/mailman/commands/cli_control.py | |
| parent | a1666479d87e26e5c79dd1cf507b8ef0472c59aa (diff) | |
| download | mailman-3189b984e68fafdffba8a5ee57816902eafd5f91.tar.gz mailman-3189b984e68fafdffba8a5ee57816902eafd5f91.tar.zst mailman-3189b984e68fafdffba8a5ee57816902eafd5f91.zip | |
Diffstat (limited to 'src/mailman/commands/cli_control.py')
| -rw-r--r-- | src/mailman/commands/cli_control.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py index 8349feb60..b5a79b820 100644 --- a/src/mailman/commands/cli_control.py +++ b/src/mailman/commands/cli_control.py @@ -121,7 +121,11 @@ class Start: os.setsid() # Instead of cd'ing to root, cd to the Mailman runtime directory. # However, before we do that, set an environment variable used by the - # subprocesses to calculate their path to the $VAR_DIR. + # subprocesses to calculate their path to the $VAR_DIR. Before we + # chdir() though, calculate the absolute path to the configuration + # file. + config_path = (os.path.abspath(args.config) + if args.config else None) os.environ['MAILMAN_VAR_DIR'] = config.VAR_DIR os.chdir(config.VAR_DIR) # Exec the master watcher. @@ -131,8 +135,8 @@ class Start: ] if args.force: execl_args.append('--force') - if args.config: - execl_args.extend(['-C', args.config]) + if config_path: + execl_args.extend(['-C', config_path]) qlog.debug('starting: %s', execl_args) os.execl(*execl_args) # We should never get here. |
