Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
e431df06
Commit
e431df06
authored
Mar 16, 2018
by
Martin Kammerlander
Browse files
Only create entry. Remove update.
parent
cbf0ceac
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_kas.sh
View file @
e431df06
...
@@ -30,6 +30,7 @@ dns_kas_add() {
...
@@ -30,6 +30,7 @@ dns_kas_add() {
_get_record_name
"
$_full_domain
"
_get_record_name
"
$_full_domain
"
_get_record_id
_get_record_id
_info
"Creating TXT DNS record"
params
=
"?kas_login=
$KAS_Login
"
params
=
"?kas_login=
$KAS_Login
"
params
=
"
$params
&kas_auth_type=
$KAS_Authtype
"
params
=
"
$params
&kas_auth_type=
$KAS_Authtype
"
params
=
"
$params
&kas_auth_data=
$KAS_Authdata
"
params
=
"
$params
&kas_auth_data=
$KAS_Authdata
"
...
@@ -41,18 +42,9 @@ dns_kas_add() {
...
@@ -41,18 +42,9 @@ dns_kas_add() {
params
=
"
$params
&wert3=
$_txt_value
"
params
=
"
$params
&wert3=
$_txt_value
"
params
=
"
$params
&var4=record_aux"
params
=
"
$params
&var4=record_aux"
params
=
"
$params
&wert4=0"
params
=
"
$params
&wert4=0"
# If there is no record_id create the record
if
[
-z
"
$_record_id
"
]
;
then
_info
"Creating TXT DNS record"
params
=
"
$params
&kas_action=add_dns_settings"
params
=
"
$params
&kas_action=add_dns_settings"
params
=
"
$params
&var5=zone_host"
params
=
"
$params
&var5=zone_host"
params
=
"
$params
&wert5=
$_zone
"
params
=
"
$params
&wert5=
$_zone
"
else
# Update the existing record
_info
"Updating existing TXT DNS record"
params
=
"
$params
&kas_action=update_dns_settings"
params
=
"
$params
&var5=record_id"
params
=
"
$params
&wert5=
$_record_id
"
fi
response
=
"
$(
_get
"
$KAS_Api$params
"
)
"
response
=
"
$(
_get
"
$KAS_Api$params
"
)
"
_debug2
"response"
"
$response
"
_debug2
"response"
"
$response
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment