File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2906,7 +2906,9 @@ public function make_ispconfig_ssl_cert() {
29062906 exec ("$ acme --issue --standalone -d " . escapeshellarg ($ hostname ) . " $ hook " , $ out , $ ret );
29072907 }
29082908
2909- if ($ ret == 0 ) {
2909+ if ($ ret == 0 || ($ ret == 2 && file_exists ($ check_acme_file ))) {
2910+ // acme.sh returns with 2 on issue for already existing certificate
2911+
29102912 // Backup existing ispserver ssl files
29112913 if (file_exists ($ ssl_crt_file ) || is_link ($ ssl_crt_file )) {
29122914 rename ($ ssl_crt_file , $ ssl_crt_file . '- ' . $ date ->format ('YmdHis ' ) . '.bak ' );
@@ -2953,6 +2955,8 @@ public function make_ispconfig_ssl_cert() {
29532955 }
29542956
29552957 if ($ ret == 0 ) {
2958+ // certbot returns with 0 on issue for already existing certificate
2959+
29562960 // Backup existing ispserver ssl files
29572961 if (file_exists ($ ssl_crt_file ) || is_link ($ ssl_crt_file )) {
29582962 rename ($ ssl_crt_file , $ ssl_crt_file . '- ' . $ date ->format ('YmdHis ' ) . '.bak ' );
You can’t perform that action at this time.
0 commit comments