Commit c87a1c8e authored by Hj Ahmad Rasyid Hj Ismail's avatar Hj Ahmad Rasyid Hj Ismail
Browse files

Update installer_base.lib.php to fix the missed svr_ip that should have been...

Update installer_base.lib.php to fix the missed svr_ip that should have been modified to include both ipv4 and ipv6 in the previous quick fix before 911 ispconfig/ispconfig3!911 proposal was merged.

This caused failure to create LE SSL certs as reported in issue 5731 ispconfig/ispconfig3#5731.

This commit is aimed to fixed the said issue.
parent 98ba3c40
Pipeline #4908 passed with stage
in 7 minutes and 59 seconds
......@@ -2761,9 +2761,7 @@ class installer_base {
// Request for certs if no LE SSL folder for server fqdn exist
$le_live_dir = '/etc/letsencrypt/live/' . $hostname;
if (!@is_dir($le_live_dir) && (
($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips))
)) {
if (!@is_dir($le_live_dir) && (($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
// This script is needed earlier to check and open http port 80 or standalone might fail
// Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
......@@ -2865,7 +2863,7 @@ class installer_base {
$date = new DateTime();
// If the LE SSL certs for this hostname exists
if (is_dir($le_live_dir) && in_array($svr_ip, $dns_ips)) {
if (is_dir($le_live_dir) && (($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
// Backup existing ispserver ssl files
if (file_exists($ssl_crt_file)) rename($ssl_crt_file, $ssl_crt_file . '-' .$date->format('YmdHis') . '.bak');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment