Commit 394f3e17 authored by Marius Cramer's avatar Marius Cramer
Browse files

- added missing language entry

- fixed letsencrypt domain list
parent 46230bad
...@@ -142,4 +142,5 @@ $wb['load_client_data_txt'] = 'Kundendaten übernehmen'; ...@@ -142,4 +142,5 @@ $wb['load_client_data_txt'] = 'Kundendaten übernehmen';
$wb['load_my_data_txt'] = 'Meine Kontaktdaten laden'; $wb['load_my_data_txt'] = 'Meine Kontaktdaten laden';
$wb['reset_client_data_txt'] = 'Daten verwerfen'; $wb['reset_client_data_txt'] = 'Daten verwerfen';
$wb["document_root_txt"] = "Document Root"; $wb["document_root_txt"] = "Document Root";
$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
?> ?>
...@@ -144,4 +144,5 @@ $wb['load_client_data_txt'] = 'Load client details'; ...@@ -144,4 +144,5 @@ $wb['load_client_data_txt'] = 'Load client details';
$wb['load_my_data_txt'] = 'Load my contact details'; $wb['load_my_data_txt'] = 'Load my contact details';
$wb['reset_client_data_txt'] = 'Reset data'; $wb['reset_client_data_txt'] = 'Reset data';
$wb["document_root_txt"] = "Document Root"; $wb["document_root_txt"] = "Document Root";
$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL';
?> ?>
...@@ -1097,6 +1097,7 @@ class apache2_plugin { ...@@ -1097,6 +1097,7 @@ class apache2_plugin {
// Check if a SSL cert exists // Check if a SSL cert exists
$ssl_dir = $data['new']['document_root'].'/ssl'; $ssl_dir = $data['new']['document_root'].'/ssl';
$domain = $data['new']['ssl_domain']; $domain = $data['new']['ssl_domain'];
if(!$domain) $domain = $data['new']['domain'];
$key_file = $ssl_dir.'/'.$domain.'.key'; $key_file = $ssl_dir.'/'.$domain.'.key';
$crt_file = $ssl_dir.'/'.$domain.'.crt'; $crt_file = $ssl_dir.'/'.$domain.'.crt';
$bundle_file = $ssl_dir.'/'.$domain.'.bundle'; $bundle_file = $ssl_dir.'/'.$domain.'.bundle';
...@@ -1152,6 +1153,7 @@ class apache2_plugin { ...@@ -1152,6 +1153,7 @@ class apache2_plugin {
$app->system->chmod($webroot . "/.well-known/acme-challenge", "g+s"); $app->system->chmod($webroot . "/.well-known/acme-challenge", "g+s");
if(file_exists("/root/.local/share/letsencrypt/bin/letsencrypt")) { if(file_exists("/root/.local/share/letsencrypt/bin/letsencrypt")) {
print "/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator=webroot --server=https://acme-v01.api.letsencrypt.org/directory --rsa-key-size=4096 --email postmaster@$domain --domains $lddomain --webroot-path " . escapeshellarg($webroot) . "\n";
$this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator=webroot --server=https://acme-v01.api.letsencrypt.org/directory --rsa-key-size=4096 --email postmaster@$domain --domains $lddomain --webroot-path " . escapeshellarg($webroot)); $this->_exec("/root/.local/share/letsencrypt/bin/letsencrypt auth --text --agree-tos --authenticator=webroot --server=https://acme-v01.api.letsencrypt.org/directory --rsa-key-size=4096 --email postmaster@$domain --domains $lddomain --webroot-path " . escapeshellarg($webroot));
} }
}; };
......
...@@ -1144,6 +1144,7 @@ class nginx_plugin { ...@@ -1144,6 +1144,7 @@ class nginx_plugin {
$ssl_dir = $data['new']['document_root'].'/ssl'; $ssl_dir = $data['new']['document_root'].'/ssl';
if(!isset($data['new']['ssl_domain']) OR empty($data['new']['ssl_domain'])) { $data['new']['ssl_domain'] = $data['new']['domain']; } if(!isset($data['new']['ssl_domain']) OR empty($data['new']['ssl_domain'])) { $data['new']['ssl_domain'] = $data['new']['domain']; }
$domain = $data['new']['ssl_domain']; $domain = $data['new']['ssl_domain'];
if(!$domain) $domain = $data['new']['domain'];
$tpl->setVar('ssl_domain', $domain); $tpl->setVar('ssl_domain', $domain);
$key_file = $ssl_dir.'/'.$domain.'.key'; $key_file = $ssl_dir.'/'.$domain.'.key';
$crt_file = $ssl_dir.'/'.$domain.'.crt'; $crt_file = $ssl_dir.'/'.$domain.'.crt';
......
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