]> git.proxmox.com Git - proxmox-acme.git/commitdiff
dns plugin: make data optional
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 16 Apr 2020 18:45:04 +0000 (20:45 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 17 Apr 2020 07:44:09 +0000 (09:44 +0200)
it might be hard-coded in a (modified) plugin, or not needed

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/ACME/DNSChallenge.pm
src/proxmox-acme

index f62333b2410052e30954ac0f9e32b34b1bdbeee8..107163ab2e1c069cfa5dc387954788801e222360 100644 (file)
@@ -137,7 +137,7 @@ sub properties {
 sub options {
     return {
        api => {},
-       data => {},
+       data => { optional => 1 },
        nodes => { optional => 1 },
        disable => { optional => 1 },
     };
index 566588f64386369ee2c6685c23420263ca95f2ca..29deba4d7548c1381cfb3d20728bb0777632614c 100644 (file)
@@ -617,7 +617,9 @@ setup() {
   plugin_conf_string=$4
   DEBUG=$5
 
-  _load_plugin_config
+  if [ -n "$plugin_conf_string" ]; then
+     _load_plugin_config
+  fi
 
   if ! . "$dns_plugin_path"; then
     _err "Load file $dns_plugin error."
@@ -644,7 +646,9 @@ teardown() {
   plugin_conf_string=$4
   DEBUG=$5
 
-  _load_plugin_config
+  if [ -n "$plugin_conf_string" ]; then
+     _load_plugin_config
+  fi
 
   if ! . "$dns_plugin_path"; then
     _err "Load file $dns_plugin error."