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
e11e32cd
Unverified
Commit
e11e32cd
authored
Apr 21, 2022
by
neil
Committed by
GitHub
Apr 21, 2022
Browse files
Merge pull request #4035 from ccope-netgate/master
LoopiaAPI error handling isn't compatible with FreeBSD
parents
4d89ce5d
03c83097
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_loopia.sh
View file @
e11e32cd
...
@@ -79,7 +79,7 @@ dns_loopia_rm() {
...
@@ -79,7 +79,7 @@ dns_loopia_rm() {
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
if
!
_contains
"
$response
"
"OK"
;
then
if
!
_contains
"
$response
"
"OK"
;
then
err_response
=
$(
echo
"
$response
"
|
grep
-oPm1
"(?<=<string>)[^<]+"
)
err_response
=
$(
echo
"
$response
"
|
sed
's/.*<string>\(.*\)<\/string>.*/\1/'
)
_err
"Error could not get txt records:
$err_response
"
_err
"Error could not get txt records:
$err_response
"
return
1
return
1
fi
fi
...
@@ -148,7 +148,7 @@ _loopia_get_records() {
...
@@ -148,7 +148,7 @@ _loopia_get_records() {
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
if
!
_contains
"
$response
"
"<array>"
;
then
if
!
_contains
"
$response
"
"<array>"
;
then
err_response
=
$(
echo
"
$response
"
|
grep
-oPm1
"(?<=<string>)[^<]+"
)
err_response
=
$(
echo
"
$response
"
|
sed
's/.*<string>\(.*\)<\/string>.*/\1/'
)
_err
"Error:
$err_response
"
_err
"Error:
$err_response
"
return
1
return
1
fi
fi
...
@@ -245,7 +245,7 @@ _loopia_add_record() {
...
@@ -245,7 +245,7 @@ _loopia_add_record() {
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
if
!
_contains
"
$response
"
"OK"
;
then
if
!
_contains
"
$response
"
"OK"
;
then
err_response
=
$(
echo
"
$response
"
|
grep
-oPm1
"(?<=<string>)[^<]+"
)
err_response
=
$(
echo
"
$response
"
|
sed
's/.*<string>\(.*\)<\/string>.*/\1/'
)
_err
"Error:
$err_response
"
_err
"Error:
$err_response
"
return
1
return
1
fi
fi
...
@@ -310,7 +310,7 @@ _loopia_add_sub_domain() {
...
@@ -310,7 +310,7 @@ _loopia_add_sub_domain() {
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
response
=
"
$(
_post
"
$xml_content
"
"
$LOOPIA_Api
"
""
"POST"
)
"
if
!
_contains
"
$response
"
"OK"
;
then
if
!
_contains
"
$response
"
"OK"
;
then
err_response
=
$(
echo
"
$response
"
|
grep
-oPm1
"(?<=<string>)[^<]+"
)
err_response
=
$(
echo
"
$response
"
|
sed
's/.*<string>\(.*\)<\/string>.*/\1/'
)
_err
"Error:
$err_response
"
_err
"Error:
$err_response
"
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