Browse Source

Remove square brackets from ranges.

Export curl header variables.
cron
Armando Lüscher 8 years ago
parent
commit
884f70fb39
No known key found for this signature in database GPG Key ID: 3D71085D14920359
  1. 7
      dnsapi/dns_cyon.sh

7
dnsapi/dns_cyon.sh

@ -74,14 +74,14 @@ _cyon_load_credentials() {
}
_cyon_is_idn() {
_idn_temp="$(printf "%s" "${1}" | tr -d "[0-9a-zA-Z.,-_]")"
_idn_temp="$(printf "%s" "${1}" | tr -d "0-9a-zA-Z.,-_")"
_idn_temp2="$(printf "%s" "${1}" | grep -o "xn--")"
[ "$_idn_temp" ] || [ "$_idn_temp2" ]
}
_cyon_load_parameters() {
# Read the required parameters to add the TXT entry.
fulldomain="$(printf "%s" "${1}" | tr '[A-Z]' '[a-z]')"
fulldomain="$(printf "%s" "${1}" | tr "A-Z" "a-z")"
fulldomain_idn="${fulldomain}"
# Special case for IDNs, as cyon needs a domain environment change,
@ -105,6 +105,7 @@ _cyon_load_parameters() {
# This header is required for curl calls.
_H1="X-Requested-With: XMLHttpRequest"
export _H1
}
_cyon_print_header() {
@ -155,6 +156,8 @@ _cyon_login() {
# NECESSARY!! Load the main page after login, to get the new cookie.
_H2="$(_cyon_get_cookie_header)"
export _H2
_get "https://my.cyon.ch/" >/dev/null
# todo: instead of just checking if the env variable is defined, check if we actually need to do a 2FA auth request.

Loading…
Cancel
Save