]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
Fix
authorViktor Sokhan <v.sokhan@nixys.ru>
Wed, 24 Aug 2022 07:12:57 +0000 (14:12 +0700)
committerViktor Sokhan <v.sokhan@nixys.ru>
Wed, 24 Aug 2022 07:12:57 +0000 (14:12 +0700)
dnsapi/dns_yc.sh

index 74a605b5382193067c18a7e8bfb154a6931733ae..9f9c3e5e3e095ea1481a9796a6599abdbbacd264 100644 (file)
@@ -5,7 +5,7 @@
 #YC_SA_ID="" # Service Account ID
 #YC_SA_Key_ID="" # Service Account IAM Key ID
 #YC_SA_Key_File_Path="/path/to/private.key" # Path to private.key use instead of PEM
-#YC_SA_Key_File_PEM="" # Content of private.key use instead of Path
+#YC_SA_Key_File_PEM_b64="" # Base64 content of private.key use instead of Path
 YC_Api="https://dns.api.cloud.yandex.net/dns/v1"
 
 ########  Public functions #####################
@@ -15,8 +15,8 @@ dns_yc_add() {
   fulldomain="$(echo "$1". | _lower_case)" # Add dot at end of domain name
   txtvalue=$2
 
-  if ["$YC_SA_Key_File_PEM"]; then
-    YC_SA_Key_File="<(echo '$YC_SA_Key_File_PEM')"
+  if ["$YC_SA_Key_File_PEM_b64"]; then
+    YC_SA_Key_File="<(echo '$YC_SA_Key_File_PEM_b64' | _dbase64 )"
   else
     YC_SA_Key_File=$YC_SA_Key_File_Path
   fi