fix(acme.sh) : full path and better commands and templates WIP

This commit is contained in:
mrflos 2022-09-07 09:57:53 +03:00
parent 521f5b6be8
commit 783952a707
2 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
[<?=$this->e($user)?>]
user = <?=$this->e($user)?>
group = <?=$this->e($user)?>
user = <?=$this->e($user)?> #unix user
group = <?=$this->e($user)?> #unix group
listen = /var/run/php-fpm-<?=$this->e($user)?>.sock
listen.owner = www-data
listen.group = www-data

View file

@ -157,9 +157,9 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
}
$subDomain = preg_match('/.'.$_SERVER['maindomain'].'$/isU', $domain, $matches, PREG_OFFSET_CAPTURE, 0);
if (!$subDomain) {
exec('acme.sh --issue -d '.$domain.' -d www.'.$domain.' -k ec-384 -w /home/'.$user.'/'.$domain, $output);
exec('/root/.acme.sh/acme.sh --issue -d '.$domain.' -d www.'.$domain.' -k ec-384 --nginx', $output);
exec('mkdir -p /etc/letsencrypt/live/'.$domain, $output);
exec('acme.sh --install-cert -d '.$domain.' --ecc \
exec('/root/.acme.sh/acme.sh --install-cert -d '.$domain.' --ecc \
--cert-file /etc/letsencrypt/live/'.$domain.'/cert.pem \
--key-file /etc/letsencrypt/live/'.$domain.'/key.pem \
--fullchain-file /etc/letsencrypt/live/'.$domain.'/fullchain.pem \
@ -176,7 +176,7 @@ function createNginxConfig($domain, $user, $herseUser, $hersePass)
'user' => $user,
'herseUser' => $herseUser,
'hersePass' => $hersePass,
'subdomain' => $subDomain,
'subDomain' => $subDomain,
]
)
);