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
e1e1ee31
Commit
e1e1ee31
authored
Mar 07, 2020
by
ThiloGa
Browse files
Dont use $? directly anymore
parent
142ca58d
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_nm.sh
View file @
e1e1ee31
...
@@ -36,9 +36,10 @@ dns_nm_add() {
...
@@ -36,9 +36,10 @@ dns_nm_add() {
get
=
"https://namemaster.de/api/api.php?User=
$NM_user
&Password=
$NM_md5
&Antwort=csv&Int=0&Typ=ACME&Zone=
$zone
&hostname=
$fulldomain
&TXT=
$txt_value
&Action=Auto&Lifetime=3600"
get
=
"https://namemaster.de/api/api.php?User=
$NM_user
&Password=
$NM_md5
&Antwort=csv&Int=0&Typ=ACME&Zone=
$zone
&hostname=
$fulldomain
&TXT=
$txt_value
&Action=Auto&Lifetime=3600"
erg
=
"
$(
_get
"
$get
"
)
"
erg
=
"
$(
_get
"
$get
"
)
"
if
[
"
$?
"
!=
"0"
]
;
then
exit_code
=
"
$?
"
if
[
"
$exit_code
"
!=
0
]
;
then
_err
"error Ading
$zone
TXT:
$txt_value
"
_err
"error Ading
$zone
TXT:
$txt_value
"
_err
"Error
$
?
"
_err
"Error
$
exit_code
"
return
1
return
1
fi
fi
...
@@ -70,9 +71,11 @@ dns_nm_rm() {
...
@@ -70,9 +71,11 @@ dns_nm_rm() {
zone
=
"
$(
echo
$fulldomain
| _egrep_o
"[^.]+.[^.]+$"
)
"
zone
=
"
$(
echo
$fulldomain
| _egrep_o
"[^.]+.[^.]+$"
)
"
get
=
"https://namemaster.de/api/api.php?User=
$NM_user
&Password=
$NM_md5
&Antwort=csv&Int=0&Typ=TXT&Zone=
$zone
&hostname=
$fulldomain
&TXT=
$txt_value
&Action=Delete_IN&TTL=0"
get
=
"https://namemaster.de/api/api.php?User=
$NM_user
&Password=
$NM_md5
&Antwort=csv&Int=0&Typ=TXT&Zone=
$zone
&hostname=
$fulldomain
&TXT=
$txt_value
&Action=Delete_IN&TTL=0"
erg
=
"
$(
_get
"
$get
"
)
"
erg
=
"
$(
_get
"
$get
"
)
"
if
[
"
$?
"
!=
"0"
]
;
then
exit_code
=
"
$?
"
if
[
"
$exit_code
"
!=
"0"
]
;
then
_err
"error Deleting
$zone
TXT:
$txt_value
"
_err
"error Deleting
$zone
TXT:
$txt_value
"
_err
"Error
$?
"
_err
"Error
$
exit_code
?"
return
1
return
1
fi
fi
...
...
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