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
d01ab227
Unverified
Commit
d01ab227
authored
Apr 06, 2019
by
neil
Committed by
GitHub
Apr 06, 2019
Browse files
Merge pull request #2209 from Neilpang/dev
sync
parents
54f1be69
0cfeee4d
Changes
3
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
d01ab227
...
@@ -2004,7 +2004,10 @@ _read_conf() {
...
@@ -2004,7 +2004,10 @@ _read_conf() {
_r_c_f
=
"
$1
"
_r_c_f
=
"
$1
"
_sdkey
=
"
$2
"
_sdkey
=
"
$2
"
if
[
-f
"
$_r_c_f
"
]
;
then
if
[
-f
"
$_r_c_f
"
]
;
then
_sdv
=
"
$(
grep
"^
$_sdkey
*="
"
$_r_c_f
"
|
cut
-d
=
-f
2-1000 |
tr
-d
"'"
)
"
_sdv
=
"
$(
eval
"
$(
grep
"^
$_sdkey
*="
"
$_r_c_f
"
)
"
eval
"printf
\"
%s
\"
\"\$
$_sdkey
\"
"
)
"
if
_startswith
"
$_sdv
"
"
${
B64CONF_START
}
"
&&
_endswith
"
$_sdv
"
"
${
B64CONF_END
}
"
;
then
if
_startswith
"
$_sdv
"
"
${
B64CONF_START
}
"
&&
_endswith
"
$_sdv
"
"
${
B64CONF_END
}
"
;
then
_sdv
=
"
$(
echo
"
$_sdv
"
|
sed
"s/
${
B64CONF_START
}
//"
|
sed
"s/
${
B64CONF_END
}
//"
| _dbase64
)
"
_sdv
=
"
$(
echo
"
$_sdv
"
|
sed
"s/
${
B64CONF_START
}
//"
|
sed
"s/
${
B64CONF_END
}
//"
| _dbase64
)
"
fi
fi
...
...
deploy/gcore_cdn.sh
View file @
d01ab227
...
@@ -74,9 +74,9 @@ gcore_cdn_deploy() {
...
@@ -74,9 +74,9 @@ gcore_cdn_deploy() {
_response
=
$(
_get
"https://api.gcdn.co/resources"
)
_response
=
$(
_get
"https://api.gcdn.co/resources"
)
_debug _response
"
$_response
"
_debug _response
"
$_response
"
_regex
=
".*(
\"
id
\"
.*?
\"
cname
\"
:
\"
$_cdomain
\"
.*?})"
_regex
=
".*(
\"
id
\"
.*?
\"
cname
\"
:
\"
$_cdomain
\"
.*?})"
_regex
=
"
\"
cname
\"
:
\"
$_cdomain
\"
"
_regex
=
"
^.*
\"
cname
\"
:
\"
$_cdomain
\"
.*$
"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_resource
=
$(
echo
"
$_response
"
|
sed
's/},{/},\n{/g'
|
grep
-E
"
$_regex
"
)
_resource
=
$(
echo
"
$_response
"
|
sed
's/},{/},\n{/g'
|
_e
grep
_o
"
$_regex
"
)
_debug _resource
"
$_resource
"
_debug _resource
"
$_resource
"
_regex
=
".*
\"
id
\"
:
\(
[0-9]*
\)
,.*$"
_regex
=
".*
\"
id
\"
:
\(
[0-9]*
\)
,.*$"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
...
...
dnsapi/dns_cf.sh
View file @
d01ab227
...
@@ -147,7 +147,7 @@ dns_cf_rm() {
...
@@ -147,7 +147,7 @@ dns_cf_rm() {
# _domain_id=sdjkglgdfewsdfg
# _domain_id=sdjkglgdfewsdfg
_get_root
()
{
_get_root
()
{
domain
=
$1
domain
=
$1
i
=
2
i
=
1
p
=
1
p
=
1
while
true
;
do
while
true
;
do
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
...
...
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