fix(ssl): wrong ssl cert is loaded to the server and UI error when regenerating SSL
This commit is contained in:
parent
1003858632
commit
7666cec462
1 changed files with 5 additions and 1 deletions
|
|
@ -80,6 +80,8 @@ public function saveCaCertificate()
|
|||
$this->caCertificate->ssl_certificate = $this->certificateContent;
|
||||
$this->caCertificate->save();
|
||||
|
||||
$this->loadCaCertificate();
|
||||
|
||||
$this->writeCertificateToServer();
|
||||
|
||||
dispatch(new RegenerateSslCertJob(
|
||||
|
|
@ -103,6 +105,8 @@ public function regenerateCaCertificate()
|
|||
validityDays: 15 * 365
|
||||
);
|
||||
|
||||
$this->loadCaCertificate();
|
||||
|
||||
$this->writeCertificateToServer();
|
||||
|
||||
dispatch(new RegenerateSslCertJob(
|
||||
|
|
@ -126,7 +130,7 @@ private function writeCertificateToServer()
|
|||
"chown -R 9999:root $caCertPath",
|
||||
"chmod -R 700 $caCertPath",
|
||||
"rm -f $caCertPath/coolify-ca.crt",
|
||||
"echo '{$this->caCertificate->ssl_certificate}' > $caCertPath/coolify-ca.crt",
|
||||
"echo '{$this->certificateContent}' > $caCertPath/coolify-ca.crt",
|
||||
"chmod 644 $caCertPath/coolify-ca.crt",
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue