-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathConfig.php
More file actions
40 lines (31 loc) · 727 Bytes
/
Config.php
File metadata and controls
40 lines (31 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Madeny\lhttps;
use Madeny\lhttps\Openssl;
use Madeny\lhttps\Path;
class Config{
function __construct()
{
$folders = ['cnf', 'config', 'csr', 'keys', 'live', 'logs'];
$i = 0;
foreach ($folders as $key => $value) {
if (file_exists(Path::all()."/".$value)) {
echo "Path to your certificates >> ".Path::all()."/live"."\n";
exec("ls ".Path::all()."/live", $outpout, $error);
foreach ($outpout as $value) {
echo $value."\n";
}
echo "----------------------- \n";
return;
}else {
while ($i < 6) {
mkdir(Path::all()."/".$folders[$i]);
$i++;
}
}
}
}
public static function file($path, $domain)
{
return new Openssl($path, $domain);
}
}