mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 00:50:32 +00:00
Update LetsEncryptSecureDomain.php
This commit is contained in:
parent
e8dc629c9c
commit
1fd03997a5
1 changed files with 7 additions and 0 deletions
|
@ -39,6 +39,11 @@ class LetsEncryptSecureDomain
|
||||||
'organization' => $generalSettings['organization_name'],
|
'organization' => $generalSettings['organization_name'],
|
||||||
])->render();
|
])->render();
|
||||||
|
|
||||||
|
$isCertbotInstalled = shell_exec('which certbot');
|
||||||
|
if (empty($isCertbotInstalled)) {
|
||||||
|
shell_exec('sudo apt install certbot -y');
|
||||||
|
}
|
||||||
|
|
||||||
$tmpFile = '/tmp/certbot-http-secure-command-'.$findDomain->id.'.sh';
|
$tmpFile = '/tmp/certbot-http-secure-command-'.$findDomain->id.'.sh';
|
||||||
file_put_contents($tmpFile, $certbotHttpSecureCommand);
|
file_put_contents($tmpFile, $certbotHttpSecureCommand);
|
||||||
shell_exec('chmod +x '.$tmpFile);
|
shell_exec('chmod +x '.$tmpFile);
|
||||||
|
@ -46,6 +51,8 @@ class LetsEncryptSecureDomain
|
||||||
shell_exec('chmod +x /usr/local/phyre/web/Modules/LetsEncrypt/shell/hooks/post/http-cleanup.sh');
|
shell_exec('chmod +x /usr/local/phyre/web/Modules/LetsEncrypt/shell/hooks/post/http-cleanup.sh');
|
||||||
$exec = shell_exec("bash $tmpFile");
|
$exec = shell_exec("bash $tmpFile");
|
||||||
|
|
||||||
|
sleep(10);
|
||||||
|
|
||||||
unlink($tmpFile);
|
unlink($tmpFile);
|
||||||
|
|
||||||
$validateCertificates = [];
|
$validateCertificates = [];
|
||||||
|
|
Loading…
Reference in a new issue