Skip to content

Commit 70396c5

Browse files
author
ncomputers.org
committed
create directories for letsencrypt
1 parent adf3d18 commit 70396c5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ function update($event_name, $data) {
12221222
// check if domains are reachable to avoid letsencrypt verification errors
12231223
$le_rnd_file = uniqid('le-') . '.txt';
12241224
$le_rnd_hash = md5(uniqid('le-', true));
1225-
mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0750,true);
1225+
if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true);
12261226
file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash);
12271227

12281228
$le_domains = array();

server/plugins-available/nginx_plugin.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,8 +1295,9 @@ function update($event_name, $data) {
12951295
// check if domains are reachable to avoid letsencrypt verification errors
12961296
$le_rnd_file = uniqid('le-') . '.txt';
12971297
$le_rnd_hash = md5(uniqid('le-', true));
1298+
if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true);
12981299
file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash);
1299-
1300+
13001301
$le_domains = array();
13011302
foreach($temp_domains as $temp_domain) {
13021303
$le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file));

0 commit comments

Comments
 (0)