3 ########################################################################
4 # https://dyndnsfree.de hook script for acme.sh
6 # Environment variables:
8 # - $DF_user (your dyndnsfree.de username)
9 # - $DF_password (your dyndnsfree.de password)
11 # Author: Thilo Gass <thilo.gass@gmail.com>
12 # Git repo: https://github.com/ThiloGa/acme.sh
14 #-- dns_df_add() - Add TXT record --------------------------------------
15 # Usage: dns_df_add _acme-challenge.subdomain.domain.com "XyZ123..."
17 dyndnsfree_api
="https://dynup.de/acme.php"
22 _info
"Using DNS-01 dyndnsfree.de hook"
24 DF_user
="${DF_user:-$(_readaccountconf_mutable DF_user)}"
25 DF_password
="${DF_password:-$(_readaccountconf_mutable DF_password)}"
26 if [ -z "$DF_user" ] ||
[ -z "$DF_password" ]; then
29 _err
"No auth details provided. Please set user credentials using the \$DF_user and \$DF_password environment variables."
32 #save the api user and password to the account conf file.
33 _debug
"Save user and password"
34 _saveaccountconf_mutable DF_user
"$DF_user"
35 _saveaccountconf_mutable DF_password
"$DF_password"
37 domain
="$(printf "%s
" "$fulldomain" | cut -d".
" -f2-)"
39 get
="$dyndnsfree_api?username=$DF_user&password=$DF_password&hostname=$domain&add_hostname=$fulldomain&txt=$txt_value"
41 if ! erg
="$(_get "$get")"; then
42 _err
"error Adding $fulldomain TXT: $txt_value"
46 if _contains
"$erg" "success"; then
47 _info
"Success, TXT Added, OK"
49 _err
"error Adding $fulldomain TXT: $txt_value erg: $erg"
53 _debug
"ok Auto $fulldomain TXT: $txt_value erg: $erg"
61 _info
"TXT enrty in $fulldomain is deleted automatically"
62 _debug fulldomain
"$fulldomain"
63 _debug txtvalue
"$txtvalue"