diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-10-02 10:38:03 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-10-02 10:38:03 +0200 |
commit | a2baad8c0b62c1d0f4bc2a01c0f442899bd7475c (patch) | |
tree | f7cb3089e987c52e731696b457d87d3d2c5d127f /ogclient | |
parent | f1b1532f78e63ebd8e09735b413ec1ad8b8ad658 (diff) |
ogclient: add --server-ip flag to override the server's IP
Add CLI flag to override the server IP defined in the config file.
Diffstat (limited to 'ogclient')
-rwxr-xr-x | ogclient | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -50,6 +50,8 @@ def create_parser(): parser.add_argument('--debug', default=False, action='store_true', help='enables debug log level') + parser.add_argument('--server-ip', default="", + help='Server IP address override') return parser @@ -75,6 +77,9 @@ def main(): print('Error: Parsing configuration file') return 0 + if args.server_ip: + CONFIG['opengnsys']['ip'] = args.server_ip + MODE = CONFIG['opengnsys']['mode'] URL = CONFIG['opengnsys']['url'] LOGLEVEL = CONFIG['opengnsys']['log'] |