Updated worker
This commit is contained in:
parent
01d4ad1447
commit
8f473426c0
1 changed files with 11 additions and 17 deletions
|
@ -94,27 +94,21 @@ class CertificatesV1
|
||||||
throw new Exception('Failed to issue a certificate');
|
throw new Exception('Failed to issue a certificate');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!@rename('/etc/letsencrypt/live/'.$domain->get(), APP_STORAGE_CERTIFICATES.'/'.$domain->get())) {
|
if(!@rename('/etc/letsencrypt/live/test.appwrite.org/cert.pem', APP_STORAGE_CERTIFICATES.'/cert.pem')) {
|
||||||
throw new Exception('Failed to copy certificate: '.json_encode($response));
|
throw new Exception('Failed to copy certificate cert.pem: '.json_encode($response));
|
||||||
}
|
}
|
||||||
|
|
||||||
// // ls cert.pem chain.pem fullchain.pem privkey.pem
|
if(!@rename('/etc/letsencrypt/live/test.appwrite.org/chain.pem', APP_STORAGE_CERTIFICATES.'/chain.pem')) {
|
||||||
|
throw new Exception('Failed to copy certificate chain.pem: '.json_encode($response));
|
||||||
|
}
|
||||||
|
|
||||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/cert.pem', APP_STORAGE_CERTIFICATES.'/cert.pem')) {
|
if(!@rename('/etc/letsencrypt/live/test.appwrite.org/fullchain.pem', APP_STORAGE_CERTIFICATES.'/fullchain.pem')) {
|
||||||
// throw new Exception('Failed to copy certificate cert.pem');
|
throw new Exception('Failed to copy certificate fullchain.pem: '.json_encode($response));
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/chain.pem', APP_STORAGE_CERTIFICATES.'/chain.pem')) {
|
if(!@rename('/etc/letsencrypt/live/test.appwrite.org/privkey.pem', APP_STORAGE_CERTIFICATES.'/privkey.pem')) {
|
||||||
// throw new Exception('Failed to copy certificate chain.pem');
|
throw new Exception('Failed to copy certificate privkey.pem: '.json_encode($response));
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/fullchain.pem', APP_STORAGE_CERTIFICATES.'/fullchain.pem')) {
|
|
||||||
// throw new Exception('Failed to copy certificate fullchain.pem');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(!@rename('/etc/letsencrypt/live/test.appwrite.org/privkey.pem', APP_STORAGE_CERTIFICATES.'/privkey.pem')) {
|
|
||||||
// throw new Exception('Failed to copy certificate privkey.pem');
|
|
||||||
// }
|
|
||||||
|
|
||||||
$certificate = array_merge($certificate, [
|
$certificate = array_merge($certificate, [
|
||||||
'$collection' => Database::SYSTEM_COLLECTION_CERTIFICATES,
|
'$collection' => Database::SYSTEM_COLLECTION_CERTIFICATES,
|
||||||
|
|
Loading…
Reference in a new issue