Skip to content

Commit 225260f

Browse files
author
Marius Burkard
committed
- allow return code 2 for acme
1 parent 3c57871 commit 225260f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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');

0 commit comments

Comments
 (0)