mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +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'],
|
||||
])->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';
|
||||
file_put_contents($tmpFile, $certbotHttpSecureCommand);
|
||||
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');
|
||||
$exec = shell_exec("bash $tmpFile");
|
||||
|
||||
sleep(10);
|
||||
|
||||
unlink($tmpFile);
|
||||
|
||||
$validateCertificates = [];
|
||||
|
|
Loading…
Reference in a new issue