]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
add newline and checks
authorVladimir Berezhnoy <non7top@gmail.com>
Sun, 9 Jul 2017 10:00:42 +0000 (13:00 +0300)
committerVladimir Berezhnoy <non7top@gmail.com>
Fri, 14 Jul 2017 00:26:36 +0000 (03:26 +0300)
dnsapi/dns_yandex.sh

index 077e6614d6fb0074d5ecbaca7549cfbf3116b5d2..fc707816e2e0ef294da71aebebca6cf4215bdb35 100755 (executable)
@@ -13,7 +13,7 @@ dns_yandex_add() {
   fulldomain="${1}"
   txtvalue="${2}"
   _debug "Calling: dns_yandex_add() '${fulldomain}' '${txtvalue}'"
-  _PDD_credentials
+  _PDD_credentials || exit 1
   export _H1="PddToken: $PDD_Token"
 
   curDomain="$(echo "${fulldomain}" | awk -F. '{printf("%s.%s\n",$(NF-1), $NF)}')"
@@ -28,7 +28,7 @@ dns_yandex_add() {
 dns_yandex_rm() {
   fulldomain="${1}"
   _debug "Calling: dns_yandex_rm() '${fulldomain}'"
-  _PDD_credentials
+  _PDD_credentials || exit 1
   export _H1="PddToken: $PDD_Token"
   record_id=$(pdd_get_record_id "${fulldomain}")
 
@@ -67,3 +67,4 @@ for r in rs:
     exit
 "
 }
+