修復錯誤
This commit is contained in:
parent
b3676761b4
commit
be60f987e4
|
@ -142,7 +142,7 @@ class SiteConstruct
|
||||||
if old_server_block.present?
|
if old_server_block.present?
|
||||||
new_server_block = old_server_block.gsub('\n',"\n").gsub(/(listen\s+)[^;]+/){|ff| "#{$1}#{port_text}"}
|
new_server_block = old_server_block.gsub('\n',"\n").gsub(/(listen\s+)[^;]+/){|ff| "#{$1}#{port_text}"}
|
||||||
if port_text == "80"
|
if port_text == "80"
|
||||||
new_server_block = new_server_block.gsub(/[ \t]*#\s*managed by Certbot/,'')
|
new_server_block = new_server_block.gsub(/^(?:(?!{|}).)*#\s*managed by Certbot(\n|$)/,'')
|
||||||
else
|
else
|
||||||
if self.site_cert && !(self.site_cert.is_certbot)
|
if self.site_cert && !(self.site_cert.is_certbot)
|
||||||
new_server_block = new_server_block.gsub(/[ \t]*#\s*managed by Certbot/,'')
|
new_server_block = new_server_block.gsub(/[ \t]*#\s*managed by Certbot/,'')
|
||||||
|
|
Loading…
Reference in New Issue