From 346f2615b1ff29ab6a0cc000617b0d49488c97bc Mon Sep 17 00:00:00 2001 From: Lukas Garberg Date: Tue, 13 Aug 2024 09:30:11 +0200 Subject: [PATCH] cli: Read global configuration Added the possibility to add global run-time configuration to the NIPAP CLI in /etc/nipaprc. The global file, if exists, will be read first and any option set in the local ~/.nipaprc file will override what's set in the global file. --- nipap-cli/nipap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipap-cli/nipap b/nipap-cli/nipap index 37d0683a4..79ea21320 100755 --- a/nipap-cli/nipap +++ b/nipap-cli/nipap @@ -85,7 +85,7 @@ if __name__ == '__main__': } # read configuration cfg = configparser.ConfigParser(cfg_defaults, allow_no_value=True) - cfg.read(userrcfile) + cfg.read(['/etc/nipaprc', userrcfile]) nipap_cli.nipap_cli.cfg = cfg if cfg.has_section("tracing"):