Merge pull request #1211 from Neilpang/dev

Dev
This commit is contained in:
neil 2018-01-21 20:22:36 +08:00 committed by GitHub
commit 66feebfc0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 6 deletions

22
acme.sh
View File

@ -2702,7 +2702,7 @@ _isRealNginxConf() {
for _fln in $(tr "\t" ' ' <"$2" | grep -n "^ *server_name.* $1" | cut -d : -f 1); do for _fln in $(tr "\t" ' ' <"$2" | grep -n "^ *server_name.* $1" | cut -d : -f 1); do
_debug _fln "$_fln" _debug _fln "$_fln"
if [ "$_fln" ]; then if [ "$_fln" ]; then
_start=$(tr "\t" ' ' <"$2" | _head_n "$_fln" | grep -n "^ *server *{" | _tail_n 1) _start=$(tr "\t" ' ' <"$2" | _head_n "$_fln" | grep -n "^ *server *" | grep -v server_name | _tail_n 1)
_debug "_start" "$_start" _debug "_start" "$_start"
_start_n=$(echo "$_start" | cut -d : -f 1) _start_n=$(echo "$_start" | cut -d : -f 1)
_start_nn=$(_math $_start_n + 1) _start_nn=$(_math $_start_n + 1)
@ -2711,8 +2711,8 @@ _isRealNginxConf() {
_left="$(sed -n "${_start_nn},99999p" "$2")" _left="$(sed -n "${_start_nn},99999p" "$2")"
_debug2 _left "$_left" _debug2 _left "$_left"
if echo "$_left" | tr "\t" ' ' | grep -n "^ *server *{" >/dev/null; then if echo "$_left" | tr "\t" ' ' | grep -n "^ *server *" >/dev/null; then
_end=$(echo "$_left" | tr "\t" ' ' | grep -n "^ *server *{" | _head_n 1) _end=$(echo "$_left" | tr "\t" ' ' | grep -n "^ *server *" | _head_n 1)
_debug "_end" "$_end" _debug "_end" "$_end"
_end_n=$(echo "$_end" | cut -d : -f 1) _end_n=$(echo "$_end" | cut -d : -f 1)
_debug "_end_n" "$_end_n" _debug "_end_n" "$_end_n"
@ -2723,8 +2723,20 @@ _isRealNginxConf() {
_debug "_seg_n" "$_seg_n" _debug "_seg_n" "$_seg_n"
if [ "$(echo "$_seg_n" | _egrep_o "^ *ssl *on *;")" ] \ _skip_ssl=1
|| [ "$(echo "$_seg_n" | _egrep_o "listen .* ssl[ |;]")" ]; then for _listen_i in $(echo "$_seg_n" | grep "^ *listen" | tr -d " "); do
if [ "$_listen_i" ]; then
if [ "$(echo "$_listen_i" | _egrep_o "listen.*ssl[ |;]")" ]; then
_debug2 "$_listen_i is ssl"
else
_debug2 "$_listen_i is plain text"
_skip_ssl=""
break;
fi
fi
done
if [ "$_skip_ssl" = "1" ]; then
_debug "ssl on, skip" _debug "ssl on, skip"
else else
FOUND_REAL_NGINX_CONF_LN=$_fln FOUND_REAL_NGINX_CONF_LN=$_fln

View File

@ -666,7 +666,7 @@ And now you can issue certs with:
acme.sh --issue --dns dns_namesilo --dnssleep 900 -d example.com -d www.example.com acme.sh --issue --dns dns_namesilo --dnssleep 900 -d example.com -d www.example.com
``` ```
## 37. Use autoDNS (InternetX) ## 36. Use autoDNS (InternetX)
[InternetX](https://www.internetx.com/) offers an [xml api](https://help.internetx.com/display/API/AutoDNS+XML-API) with your standard login credentials, set them like so: [InternetX](https://www.internetx.com/) offers an [xml api](https://help.internetx.com/display/API/AutoDNS+XML-API) with your standard login credentials, set them like so: