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
8adb8a69
Commit
8adb8a69
authored
Mar 23, 2021
by
wout
Browse files
While [0-9]+ is a bit more correct than [0-9]*, the former does not seem to work on Solaris.
parent
cc7e1a72
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_constellix.sh
View file @
8adb8a69
...
@@ -44,7 +44,7 @@ dns_constellix_add() {
...
@@ -44,7 +44,7 @@ dns_constellix_add() {
fi
fi
fi
fi
else
else
_record_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
id
\"
:[0-9]
+
"
|
cut
-d
':'
-f
2
)
_record_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
id
\"
:[0-9]
*
"
|
cut
-d
':'
-f
2
)
if
_constellix_rest GET
"domains/
${
_domain_id
}
/records/TXT/
${
_record_id
}
"
;
then
if
_constellix_rest GET
"domains/
${
_domain_id
}
/records/TXT/
${
_record_id
}
"
;
then
_new_rr_values
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
roundRobin
\"
:
\[
.*?
\]
"
|
sed
"s/
\]
$/
,{
\"
value
\"
:
\"
${
txtvalue
}
\"
}]/"
)
_new_rr_values
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
roundRobin
\"
:
\[
.*?
\]
"
|
sed
"s/
\]
$/
,{
\"
value
\"
:
\"
${
txtvalue
}
\"
}]/"
)
_debug _new_rr_values
"
$_new_rr_values
"
_debug _new_rr_values
"
$_new_rr_values
"
...
@@ -123,7 +123,7 @@ _get_root() {
...
@@ -123,7 +123,7 @@ _get_root() {
fi
fi
if
_contains
"
$response
"
"
\"
name
\"
:
\"
$h
\"
"
;
then
if
_contains
"
$response
"
"
\"
name
\"
:
\"
$h
\"
"
;
then
_domain_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
id
\"
:[0-9]
+
"
|
cut
-d
':'
-f
2
)
_domain_id
=
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
"
\"
id
\"
:[0-9]
*
"
|
cut
-d
':'
-f
2
)
if
[
"
$_domain_id
"
]
;
then
if
[
"
$_domain_id
"
]
;
then
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
'.'
-f
1-
$p
)
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
'.'
-f
1-
$p
)
_domain
=
"
$h
"
_domain
=
"
$h
"
...
...
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