Commit 6d909bf3 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'mkdirletsnew' into 'master'

create directories for letsencrypt



See merge request !569
parents adf3d183 70396c57
......@@ -1222,7 +1222,7 @@ class apache2_plugin {
// check if domains are reachable to avoid letsencrypt verification errors
$le_rnd_file = uniqid('le-') . '.txt';
$le_rnd_hash = md5(uniqid('le-', true));
mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0750,true);
if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true);
file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash);
$le_domains = array();
......
......@@ -1295,8 +1295,9 @@ class nginx_plugin {
// check if domains are reachable to avoid letsencrypt verification errors
$le_rnd_file = uniqid('le-') . '.txt';
$le_rnd_hash = md5(uniqid('le-', true));
if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true);
file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash);
$le_domains = array();
foreach($temp_domains as $temp_domain) {
$le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file));
......
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