Commit 5e37939c authored by Marius Burkard's avatar Marius Burkard

Merge branch 'stable-3.1'

parents 552f6e03 2fc23db2
...@@ -59,6 +59,8 @@ function prepareDBDump() { ...@@ -59,6 +59,8 @@ function prepareDBDump() {
system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']); system("mysqldump -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']);
} }
chmod('existing_db.sql', 0400);
chown('existing_db.sql', 'root');
/* /*
* If we have a server with nothing in it except VE's then the database of thie server is empty. * If we have a server with nothing in it except VE's then the database of thie server is empty.
......
...@@ -52,7 +52,7 @@ class cronjob_letsencrypt extends cronjob { ...@@ -52,7 +52,7 @@ class cronjob_letsencrypt extends cronjob {
$server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $server_config = $app->getconf->get_server_config($conf['server_id'], 'server');
if(!isset($server_config['migration_mode']) || $server_config['migration_mode'] != 'y') { if(!isset($server_config['migration_mode']) || $server_config['migration_mode'] != 'y') {
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
$letsencrypt = reset($letsencrypt); $letsencrypt = reset($letsencrypt);
if(is_executable($letsencrypt)) { if(is_executable($letsencrypt)) {
$version = exec($letsencrypt . ' --version 2>&1', $ret, $val); $version = exec($letsencrypt . ' --version 2>&1', $ret, $val);
......
...@@ -250,6 +250,12 @@ class letsencrypt { ...@@ -250,6 +250,12 @@ class letsencrypt {
unset($le_domains); unset($le_domains);
@unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file); @unlink('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file);
$le_domain_count = count($temp_domains);
if($le_domain_count > 100) {
$temp_domains = array_splice($temp_domains, 0, 100);
$app->log("There were " . $le_domain_count . " domains in the domain list. LE only supports 100, so we strip the rest.", LOGLEVEL_WARN);
}
// generate cli format // generate cli format
foreach($temp_domains as $temp_domain) { foreach($temp_domains as $temp_domain) {
$cli_domain_arg .= (string) " --domains " . $temp_domain; $cli_domain_arg .= (string) " --domains " . $temp_domain;
...@@ -266,7 +272,7 @@ class letsencrypt { ...@@ -266,7 +272,7 @@ class letsencrypt {
$app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
$app->log("Let's Encrypt SSL Cert domains: $cli_domain_arg", LOGLEVEL_DEBUG); $app->log("Let's Encrypt SSL Cert domains: $cli_domain_arg", LOGLEVEL_DEBUG);
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot'));
$letsencrypt = reset($letsencrypt); $letsencrypt = reset($letsencrypt);
if(is_executable($letsencrypt)) { if(is_executable($letsencrypt)) {
$letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $cli_domain_arg --webroot-path /usr/local/ispconfig/interface/acme"; $letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $cli_domain_arg --webroot-path /usr/local/ispconfig/interface/acme";
......
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