diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php index ea1e745a7733db43bc1716e72488424dea2ecc38..583e1c25bb8fc2bd465bf1c3d9003faa60bbfc10 100644 --- a/server/lib/classes/letsencrypt.inc.php +++ b/server/lib/classes/letsencrypt.inc.php @@ -388,12 +388,8 @@ class letsencrypt { $app->system->unlink($key_file); } - if ($web_config["website_symlinks_rel"] == 'y') { - $app->system->create_relative_link(escapeshellcmd($key_tmp_file), escapeshellcmd($key_file)); - } else { - if(@is_link($key_file)) $app->system->unlink($key_file); - if(@file_exists($key_tmp_file)) exec("ln -s ".escapeshellcmd($key_tmp_file)." ".escapeshellcmd($key_file)); - } + if(@is_link($key_file)) $app->system->unlink($key_file); + if(@file_exists($key_tmp_file)) exec("ln -s ".escapeshellcmd($key_tmp_file)." ".escapeshellcmd($key_file)); if(is_file($crt_file)) { $app->system->copy($crt_file, $crt_file.'.old.'.$date); @@ -401,12 +397,8 @@ class letsencrypt { $app->system->unlink($crt_file); } - if($web_config["website_symlinks_rel"] == 'y') { - $app->system->create_relative_link(escapeshellcmd($crt_tmp_file), escapeshellcmd($crt_file)); - } else { - if(@is_link($crt_file)) $app->system->unlink($crt_file); - if(@file_exists($crt_tmp_file))exec("ln -s ".escapeshellcmd($crt_tmp_file)." ".escapeshellcmd($crt_file)); - } + if(@is_link($crt_file)) $app->system->unlink($crt_file); + if(@file_exists($crt_tmp_file))exec("ln -s ".escapeshellcmd($crt_tmp_file)." ".escapeshellcmd($crt_file)); if(is_file($bundle_file)) { $app->system->copy($bundle_file, $bundle_file.'.old.'.$date); @@ -414,12 +406,8 @@ class letsencrypt { $app->system->unlink($bundle_file); } - if($web_config["website_symlinks_rel"] == 'y') { - $app->system->create_relative_link(escapeshellcmd($bundle_tmp_file), escapeshellcmd($bundle_file)); - } else { - if(@is_link($bundle_file)) $app->system->unlink($bundle_file); - if(@file_exists($bundle_tmp_file)) exec("ln -s ".escapeshellcmd($bundle_tmp_file)." ".escapeshellcmd($bundle_file)); - } + if(@is_link($bundle_file)) $app->system->unlink($bundle_file); + if(@file_exists($bundle_tmp_file)) exec("ln -s ".escapeshellcmd($bundle_tmp_file)." ".escapeshellcmd($bundle_file)); return true; } else { diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index f4d94743a16c82903215378d2aac5993a4a05af9..5c277ada1a09a2dca2af100a0e6dcbe1fed08204 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -918,7 +918,7 @@ class system{ // Add ($cnt_to-1) number of "../" elements to left side of $cfrom for ($c = 0; $c < (count($a2)-1); $c++) { $cfrom = '../'.$cfrom; } - if(strstr($to,'/etc/letsencrypt/archive/')) $to = str_replace('/etc/letsencrypt/archive/','/etc/letsencrypt/live/',$to); + //if(strstr($to,'/etc/letsencrypt/archive/')) $to = str_replace('/etc/letsencrypt/archive/','/etc/letsencrypt/live/',$to); return symlink($cfrom, $to); }