修復錯誤

This commit is contained in:
邱博亞 2023-05-20 10:56:15 +08:00
parent b3676761b4
commit be60f987e4
1 changed files with 1 additions and 1 deletions

View File

@ -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/,'')