Commit 695761b4 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch...

Merge branch '5784-missing-symlinks-to-etc-letsencrypt-live-on-certbot-during-install-update' into 'develop'

Resolve "Missing symlinks to /etc/letsencrypt/live on certbot during install/update"

Closes #5784

See merge request ispconfig/ispconfig3!1228
parents 27bf2009 510d5ad3
Pipeline #5512 passed with stage
in 10 seconds
......@@ -2999,6 +2999,10 @@ class installer_base {
rename($ssl_pem_file, $ssl_pem_file . '-' . $date->format('YmdHis') . '.bak');
}
$acme_cert_dir = '/etc/letsencrypt/live/' . $hostname;
symlink($acme_cert_dir . '/fullchain.pem', $ssl_crt_file);
symlink($acme_cert_dir . '/privkey.pem', $ssl_key_file);
$issued_successfully = true;
} else {
swriteln('Issuing certificate via certbot failed. Please check log files and make sure that your hostname can be verified by letsencrypt');
......@@ -3043,6 +3047,7 @@ class installer_base {
}
// Build ispserver.pem file and chmod it
if(file_exists($ssl_key_file)) {
exec("cat $ssl_key_file $ssl_crt_file > $ssl_pem_file; chmod 600 $ssl_pem_file");
// Extend LE SSL certs to postfix
......@@ -3080,6 +3085,7 @@ class installer_base {
if (!file_exists("$pureftpd_dir/pure-ftpd-dhparams.pem"))
exec("cd $pureftpd_dir; openssl dhparam -out dhparam2048.pem 2048; ln -sf dhparam2048.pem pure-ftpd-dhparams.pem");
}
}
exec("chown -R root:root $ssl_dir");
......
Supports Markdown
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