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
41c8d882
Unverified
Commit
41c8d882
authored
Jan 19, 2018
by
neil
Committed by
GitHub
Jan 19, 2018
Browse files
Merge pull request #1206 from Neilpang/dev
Dev
parents
0e65fdd6
37f39c08
Changes
2
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
41c8d882
...
@@ -2548,10 +2548,7 @@ _setNginx() {
...
@@ -2548,10 +2548,7 @@ _setNginx() {
_d="$1"
_d="$1"
_croot="$2"
_croot="$2"
_thumbpt="$3"
_thumbpt="$3"
if ! _exists "nginx"; then
_err "nginx command is not found."
return 1
fi
FOUND_REAL_NGINX_CONF=""
FOUND_REAL_NGINX_CONF=""
FOUND_REAL_NGINX_CONF_LN=""
FOUND_REAL_NGINX_CONF_LN=""
BACKUP_NGINX_CONF=""
BACKUP_NGINX_CONF=""
...
@@ -2561,6 +2558,10 @@ _setNginx() {
...
@@ -2561,6 +2558,10 @@ _setNginx() {
if [ -z "$_start_f" ]; then
if [ -z "$_start_f" ]; then
_debug "find start conf from nginx command"
_debug "find start conf from nginx command"
if [ -z "$NGINX_CONF" ]; then
if [ -z "$NGINX_CONF" ]; then
if ! _exists "nginx"; then
_err "nginx command is not found."
return 1
fi
NGINX_CONF="$(nginx -V 2>&1 | _egrep_o "--conf-path=[^ ]* " | tr -d " ")"
NGINX_CONF="$(nginx -V 2>&1 | _egrep_o "--conf-path=[^ ]* " | tr -d " ")"
_debug NGINX_CONF "$NGINX_CONF"
_debug NGINX_CONF "$NGINX_CONF"
NGINX_CONF="$(echo "$NGINX_CONF" | cut -d = -f 2)"
NGINX_CONF="$(echo "$NGINX_CONF" | cut -d = -f 2)"
...
@@ -2605,6 +2606,10 @@ _setNginx() {
...
@@ -2605,6 +2606,10 @@ _setNginx() {
return 1
return 1
fi
fi
if ! _exists "nginx"; then
_err "nginx command is not found."
return 1
fi
_info "Check the nginx conf before setting up."
_info "Check the nginx conf before setting up."
if ! _exec "nginx -t" >/dev/null; then
if ! _exec "nginx -t" >/dev/null; then
_exec_err
_exec_err
...
@@ -5510,7 +5515,7 @@ _process() {
...
@@ -5510,7 +5515,7 @@ _process() {
HTTPS_INSECURE="1"
HTTPS_INSECURE="1"
;;
;;
--ca-bundle)
--ca-bundle)
_ca_bundle="$(_readlink
-f
"$2")"
_ca_bundle="$(_readlink "$2")"
CA_BUNDLE="$_ca_bundle"
CA_BUNDLE="$_ca_bundle"
shift
shift
;;
;;
...
...
dnsapi/dns_aws.sh
View file @
41c8d882
...
@@ -19,6 +19,8 @@ dns_aws_add() {
...
@@ -19,6 +19,8 @@ dns_aws_add() {
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
txtvalue
=
$2
AWS_ACCESS_KEY_ID
=
"
${
AWS_ACCESS_KEY_ID
:-
$(
_readaccountconf_mutable AWS_ACCESS_KEY_ID
)
}
"
AWS_SECRET_ACCESS_KEY
=
"
${
AWS_SECRET_ACCESS_KEY
:-
$(
_readaccountconf_mutable AWS_SECRET_ACCESS_KEY
)
}
"
if
[
-z
"
$AWS_ACCESS_KEY_ID
"
]
||
[
-z
"
$AWS_SECRET_ACCESS_KEY
"
]
;
then
if
[
-z
"
$AWS_ACCESS_KEY_ID
"
]
||
[
-z
"
$AWS_SECRET_ACCESS_KEY
"
]
;
then
AWS_ACCESS_KEY_ID
=
""
AWS_ACCESS_KEY_ID
=
""
AWS_SECRET_ACCESS_KEY
=
""
AWS_SECRET_ACCESS_KEY
=
""
...
@@ -27,10 +29,9 @@ dns_aws_add() {
...
@@ -27,10 +29,9 @@ dns_aws_add() {
return
1
return
1
fi
fi
if
[
-z
"
$AWS_SESSION_TOKEN
"
]
;
then
#save for future use
_saveaccountconf AWS_ACCESS_KEY_ID
"
$AWS_ACCESS_KEY_ID
"
_saveaccountconf_mutable AWS_ACCESS_KEY_ID
"
$AWS_ACCESS_KEY_ID
"
_saveaccountconf AWS_SECRET_ACCESS_KEY
"
$AWS_SECRET_ACCESS_KEY
"
_saveaccountconf_mutable AWS_SECRET_ACCESS_KEY
"
$AWS_SECRET_ACCESS_KEY
"
fi
_debug
"First detect the root zone"
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
if
!
_get_root
"
$fulldomain
"
;
then
...
@@ -56,6 +57,8 @@ dns_aws_rm() {
...
@@ -56,6 +57,8 @@ dns_aws_rm() {
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
txtvalue
=
$2
AWS_ACCESS_KEY_ID
=
"
${
AWS_ACCESS_KEY_ID
:-
$(
_readaccountconf_mutable AWS_ACCESS_KEY_ID
)
}
"
AWS_SECRET_ACCESS_KEY
=
"
${
AWS_SECRET_ACCESS_KEY
:-
$(
_readaccountconf_mutable AWS_SECRET_ACCESS_KEY
)
}
"
_debug
"First detect the root zone"
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
if
!
_get_root
"
$fulldomain
"
;
then
_err
"invalid domain"
_err
"invalid domain"
...
...
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