From: Scott Baker Date: Wed, 30 Apr 2014 16:40:23 +0000 (-0700) Subject: add config file option X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6ef76159ab32e454241f7979a1cdf320c463dd9e;p=plstackapi.git add config file option --- diff --git a/planetstack/planetstack-backend.py b/planetstack/planetstack-backend.py index 8a2eff2..596ecdd 100755 --- a/planetstack/planetstack-backend.py +++ b/planetstack/planetstack-backend.py @@ -29,6 +29,10 @@ def main(): parser = argparse.ArgumentParser(usage='%(prog)s [options]') parser.add_argument('-d', '--daemon', dest='daemon', action='store_true', default=False, help='Run as daemon.') + # smbaker: util/config.py parses sys.argv[] directly to get config file name; include the option here to avoid + # throwing unrecognized argument exceptions + parser.add_argument('-C', '--config', dest='config_file', action='store', default="/opt/planetstack/plstackapi_config", + help='Name of config file.') args = parser.parse_args() if args.daemon: daemon()