1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

Fix for missing paths

This commit is contained in:
Eldad Fux 2020-02-25 11:21:56 +02:00
parent a59dadac83
commit 41b0076623

View file

@ -93,6 +93,14 @@ class CertificatesV1
if(!$response) {
throw new Exception('Failed to issue a certificate');
}
$path = APP_STORAGE_CERTIFICATES.'/'.$domain->get();
if(!is_readable($path)) {
if (!mkdir($path, 0755, true)) {
throw new Exception('Failed to create path...');
}
}
if(!@rename('/etc/letsencrypt/live/'.$domain->get().'/cert.pem', APP_STORAGE_CERTIFICATES.'/'.$domain->get().'/cert.pem')) {
throw new Exception('Failed to rename certificate cert.pem: '.json_encode($response));