mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
first attempt to make travis happy
This commit is contained in:
parent
943d419f98
commit
90e2064d72
@ -11,11 +11,28 @@ dns_dynv6_add() {
|
|||||||
_info "Using dynv6 api"
|
_info "Using dynv6 api"
|
||||||
_debug fulldomain "$fulldomain"
|
_debug fulldomain "$fulldomain"
|
||||||
_debug txtvalue "$txtvalue"
|
_debug txtvalue "$txtvalue"
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
_get_authentication
|
_get_authentication
|
||||||
if [ "$dynv6_token" ]; then
|
if [ "$dynv6_token" ]; then
|
||||||
_dns_dynv6_add_http
|
_dns_dynv6_add_http
|
||||||
return $?
|
return $?
|
||||||
|
=======
|
||||||
|
_get_keyfile
|
||||||
|
_info "using keyfile $dynv6_keyfile"
|
||||||
|
_your_hosts="$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts)"
|
||||||
|
if ! _get_domain "$fulldomain" "$_your_hosts"; then
|
||||||
|
_err "Host not found on your account"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
_debug "found host on your account"
|
||||||
|
returnval="$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts \""$_host"\" records set \""$_record"\" txt data \""$txtvalue"\")"
|
||||||
|
_debug "Dynv6 returend this after record was added: $returnval"
|
||||||
|
if _contains "$returnval" "created"; then
|
||||||
|
return 0
|
||||||
|
elif _contains "$returnval" "updated"; then
|
||||||
|
return 0
|
||||||
|
>>>>>>> first attempt to make travis happy
|
||||||
else
|
else
|
||||||
_info "using key file $dynv6_keyfile"
|
_info "using key file $dynv6_keyfile"
|
||||||
_your_hosts="$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts)"
|
_your_hosts="$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts)"
|
||||||
@ -46,6 +63,7 @@ dns_dynv6_rm() {
|
|||||||
_info "Using dynv6 API"
|
_info "Using dynv6 API"
|
||||||
_debug fulldomain "$fulldomain"
|
_debug fulldomain "$fulldomain"
|
||||||
_debug txtvalue "$txtvalue"
|
_debug txtvalue "$txtvalue"
|
||||||
|
<<<<<<< HEAD
|
||||||
_get_authentication
|
_get_authentication
|
||||||
if [ "$dynv6_token" ]; then
|
if [ "$dynv6_token" ]; then
|
||||||
_dns_dynv6_rm_http
|
_dns_dynv6_rm_http
|
||||||
@ -61,6 +79,18 @@ dns_dynv6_rm() {
|
|||||||
_info "$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts "\"$_host\"" records del "\"$_record\"" txt)"
|
_info "$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts "\"$_host\"" records del "\"$_record\"" txt)"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
=======
|
||||||
|
_get_keyfile
|
||||||
|
_info "using keyfile $dynv6_keyfile"
|
||||||
|
_your_hosts="$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts)"
|
||||||
|
if ! _get_domain "$fulldomain" "$_your_hosts"; then
|
||||||
|
_err "Host not found on your account"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
_debug "found host on your account"
|
||||||
|
_info "$(ssh -i "$dynv6_keyfile" api@dynv6.com hosts "\"$_host\"" records del "\"$_record\"" txt)"
|
||||||
|
return 0
|
||||||
|
>>>>>>> first attempt to make travis happy
|
||||||
}
|
}
|
||||||
#################### Private functions below ##################################
|
#################### Private functions below ##################################
|
||||||
#Usage: No Input required
|
#Usage: No Input required
|
||||||
@ -91,13 +121,13 @@ _get_domain() {
|
|||||||
|
|
||||||
_your_hosts="$(echo "$_your_hosts" | awk '/\./ {print $1}')"
|
_your_hosts="$(echo "$_your_hosts" | awk '/\./ {print $1}')"
|
||||||
for l in $_your_hosts; do
|
for l in $_your_hosts; do
|
||||||
#echo "host: $l"
|
#echo "host: $l"
|
||||||
if test "${_full_domain#*$l}" != "$_full_domain"; then
|
if test "${_full_domain#*$l}" != "$_full_domain"; then
|
||||||
_record="${_full_domain%.$l}"
|
_record="${_full_domain%.$l}"
|
||||||
_host=$l
|
_host=$l
|
||||||
_debug "The host is $_host and the record $_record"
|
_debug "The host is $_host and the record $_record"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
_err "Either their is no such host on your dnyv6 account or it cannot be accessed with this key"
|
_err "Either their is no such host on your dnyv6 account or it cannot be accessed with this key"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user