Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
03a13869
Unverified
Commit
03a13869
authored
May 02, 2018
by
Kordian Bruck
Browse files
Update serial also when deleting the token
parent
676402d9
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_ispconfig.sh
View file @
03a13869
...
@@ -128,7 +128,7 @@ _ISPC_addTxt() {
...
@@ -128,7 +128,7 @@ _ISPC_addTxt() {
curSerial
=
"
$(
date
+%s
)
"
curSerial
=
"
$(
date
+%s
)
"
curStamp
=
"
$(
date
+
'%F %T'
)
"
curStamp
=
"
$(
date
+
'%F %T'
)
"
params
=
"
\"
server_id
\"
:
\"
${
server_id
}
\"
,
\"
zone
\"
:
\"
${
zone
}
\"
,
\"
name
\"
:
\"
${
fulldomain
}
.
\"
,
\"
type
\"
:
\"
txt
\"
,
\"
data
\"
:
\"
${
txtvalue
}
\"
,
\"
aux
\"
:
\"
0
\"
,
\"
ttl
\"
:
\"
3600
\"
,
\"
active
\"
:
\"
y
\"
,
\"
stamp
\"
:
\"
${
curStamp
}
\"
,
\"
serial
\"
:
\"
${
curSerial
}
\"
"
params
=
"
\"
server_id
\"
:
\"
${
server_id
}
\"
,
\"
zone
\"
:
\"
${
zone
}
\"
,
\"
name
\"
:
\"
${
fulldomain
}
.
\"
,
\"
type
\"
:
\"
txt
\"
,
\"
data
\"
:
\"
${
txtvalue
}
\"
,
\"
aux
\"
:
\"
0
\"
,
\"
ttl
\"
:
\"
3600
\"
,
\"
active
\"
:
\"
y
\"
,
\"
stamp
\"
:
\"
${
curStamp
}
\"
,
\"
serial
\"
:
\"
${
curSerial
}
\"
"
curData
=
"{
\"
session_id
\"
:
\"
${
sessionID
}
\"
,
\"
client_id
\"
:
\"
${
client_id
}
\"
,
\"
params
\"
:{
${
params
}
},
\"
update_serial
\"
:true}
}
"
curData
=
"{
\"
session_id
\"
:
\"
${
sessionID
}
\"
,
\"
client_id
\"
:
\"
${
client_id
}
\"
,
\"
params
\"
:{
${
params
}
},
\"
update_serial
\"
:true}"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
ISPC_Api
}
?dns_txt_add"
)
"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
ISPC_Api
}
?dns_txt_add"
)
"
_debug
"Calling _ISPC_addTxt: '
${
curData
}
' '
${
ISPC_Api
}
?dns_txt_add'"
_debug
"Calling _ISPC_addTxt: '
${
curData
}
' '
${
ISPC_Api
}
?dns_txt_add'"
_debug
"Result of _ISPC_addTxt: '
$curResult
'"
_debug
"Result of _ISPC_addTxt: '
$curResult
'"
...
@@ -160,7 +160,7 @@ _ISPC_rmTxt() {
...
@@ -160,7 +160,7 @@ _ISPC_rmTxt() {
*
)
*
)
unset
IFS
unset
IFS
_info
"Retrieved Record ID."
_info
"Retrieved Record ID."
curData
=
"{
\"
session_id
\"
:
\"
${
sessionID
}
\"
,
\"
primary_id
\"
:
\"
${
record_id
}
\"
}"
curData
=
"{
\"
session_id
\"
:
\"
${
sessionID
}
\"
,
\"
primary_id
\"
:
\"
${
record_id
}
\"
,
\"
update_serial
\"
:true
}"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
ISPC_Api
}
?dns_txt_delete"
)
"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
ISPC_Api
}
?dns_txt_delete"
)
"
_debug
"Calling _ISPC_rmTxt: '
${
curData
}
' '
${
ISPC_Api
}
?dns_txt_delete'"
_debug
"Calling _ISPC_rmTxt: '
${
curData
}
' '
${
ISPC_Api
}
?dns_txt_delete'"
_debug
"Result of _ISPC_rmTxt: '
$curResult
'"
_debug
"Result of _ISPC_rmTxt: '
$curResult
'"
...
...
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