修復錯誤
This commit is contained in:
parent
33be28d7ad
commit
b3676761b4
|
@ -142,10 +142,10 @@ 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(/^.*#\s*managed by Certbot(\n|$)/,'')
|
new_server_block = new_server_block.gsub(/[ \t]*#\s*managed by Certbot/,'')
|
||||||
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(/#\s*managed by Certbot/,'')
|
new_server_block = new_server_block.gsub(/[ \t]*#\s*managed by Certbot/,'')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
new_server_block = new_server_block.gsub(/(server_name\s+)[^;]+/m){|ff| "#{$1}#{domain_name_str}"}
|
new_server_block = new_server_block.gsub(/(server_name\s+)[^;]+/m){|ff| "#{$1}#{domain_name_str}"}
|
||||||
|
|
Loading…
Reference in New Issue