mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
1fd03997a5
commit
89b94eb86c
2 changed files with 12 additions and 1 deletions
|
@ -33,6 +33,9 @@ class LetsEncryptSecureDomain
|
|||
'domain' => $findDomain->domain,
|
||||
'domainRoot' => $findDomain->domain_root,
|
||||
'domainPublic' => $findDomain->domain_public,
|
||||
'sslCertificateFilePath'=> $sslCertificateFilePath,
|
||||
'sslCertificateKeyFilePath'=> $sslCertificateKeyFilePath,
|
||||
'sslCertificateChainFilePath'=> $sslCertificateChainFilePath,
|
||||
'email' => $generalSettings['master_email'],
|
||||
'country' => $generalSettings['master_country'],
|
||||
'locality' => $generalSettings['master_locality'],
|
||||
|
@ -43,7 +46,7 @@ class LetsEncryptSecureDomain
|
|||
if (empty($isCertbotInstalled)) {
|
||||
shell_exec('sudo apt install certbot -y');
|
||||
}
|
||||
|
||||
$output ='';
|
||||
$tmpFile = '/tmp/certbot-http-secure-command-'.$findDomain->id.'.sh';
|
||||
file_put_contents($tmpFile, $certbotHttpSecureCommand);
|
||||
shell_exec('chmod +x '.$tmpFile);
|
||||
|
@ -52,6 +55,10 @@ class LetsEncryptSecureDomain
|
|||
$exec = shell_exec("bash $tmpFile");
|
||||
|
||||
sleep(10);
|
||||
shell_exec('chmod 0755 /etc/letsencrypt/live/'.$findDomain->domain.'/privkey.pem');
|
||||
shell_exec('chmod 0755 /etc/letsencrypt/live/'.$findDomain->domain.'/fullchain.pem');
|
||||
shell_exec('chmod 0755 /etc/letsencrypt/live/'.$findDomain->domain.'/cert.pem');
|
||||
shell_exec('chmod 0755 /etc/letsencrypt/live/'.$findDomain->domain.'/chain.pem');
|
||||
|
||||
unlink($tmpFile);
|
||||
|
||||
|
|
|
@ -4,6 +4,10 @@ sudo certbot certonly \
|
|||
--manual \
|
||||
--preferred-challenges=http \
|
||||
-d {{$domain}} \
|
||||
--cert-name {{$domain}} \
|
||||
--email {{$email}} \
|
||||
--cert-path {{$sslCertificateFilePath}} \
|
||||
--key-path {{$sslCertificateKeyFilePath}} \
|
||||
--fullchain-path {{$sslCertificateChainFilePath}} \
|
||||
--manual-auth-hook /usr/local/phyre/web/Modules/LetsEncrypt/shell/hooks/pre/http-authenticator.sh \
|
||||
--force-renewal
|
||||
|
|
Loading…
Reference in a new issue