summaryrefslogtreecommitdiffstats
path: root/ogclient
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-10-02 10:38:03 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-10-02 10:38:03 +0200
commita2baad8c0b62c1d0f4bc2a01c0f442899bd7475c (patch)
treef7cb3089e987c52e731696b457d87d3d2c5d127f /ogclient
parentf1b1532f78e63ebd8e09735b413ec1ad8b8ad658 (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-xogclient5
1 files changed, 5 insertions, 0 deletions
diff --git a/ogclient b/ogclient
index 39aa3a6..5abb1b0 100755
--- a/ogclient
+++ b/ogclient
@@ -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']