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
10b4bb59
Commit
10b4bb59
authored
Feb 12, 2024
by
neil
Browse files
fix
https://github.com/acmesh-official/acme.sh/issues/4995#issuecomment-1937486243
parent
d76272f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
10b4bb59
...
...
@@ -3195,7 +3195,8 @@ _setNginx() {
return 1
fi
_info "Check the nginx conf before setting up."
if ! nginx -t >/dev/null; then
if ! nginx -t >/dev/null 2>&1; then
_err "It seems that nginx conf is not correct, cannot continue."
return 1
fi
...
...
@@ -3222,14 +3223,14 @@ location ~ \"^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)\$\" {
fi
_debug3 "Modified config:$(cat $FOUND_REAL_NGINX_CONF)"
_info "nginx conf is done, let's check it again."
if ! nginx -t >/dev/null; then
if ! nginx -t >/dev/null
2>&1
; then
_err "It seems that nginx conf was broken, let's restore."
cat "$_backup_conf" >"$FOUND_REAL_NGINX_CONF"
return 1
fi
_info "Reload nginx"
if ! nginx -s reload >/dev/null; then
if ! nginx -s reload >/dev/null
2>&1
; then
_err "It seems that nginx reload error, let's restore."
cat "$_backup_conf" >"$FOUND_REAL_NGINX_CONF"
return 1
...
...
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