]> git.proxmox.com Git - pmg-api.git/commitdiff
nodeconfig: parse acme config before writing
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 15 Apr 2021 19:46:20 +0000 (21:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 13 Jul 2021 08:01:43 +0000 (10:01 +0200)
we use `get_acme_conf` as higher level sanity checker (e.g. to ensure
that wildcard certificates have a configured DNS plugin)

(adapted from pve-manger (where this is done in the corresponding API
call)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/NodeConfig.pm

index 029b9030d796239538c1f546c07fdd6c88a1ae85..42139e4c3bfbf4c689b69b577ca4d7d5d70345b6 100644 (file)
@@ -131,6 +131,9 @@ sub read_pmg_node_config {
 sub write_pmg_node_config {
     my ($filename, $fh, $cfg) = @_;
     my $raw = PVE::JSONSchema::dump_config($config_schema, $filename, $cfg);
+
+    # higher level ACME sanity checking
+    get_acme_conf($cfg);
     PVE::Tools::safe_print($filename, $fh, $raw);
 }