Move cert change notification into ensureCertificate()

When ensureCertificate renews the cert, the filename will match the
nginx config cert file. The current code detects that this implies
that the cert has not changed and thus does not update mail container.

Move the notification into ensureCertificate() itself. If we have a wildcard
cert and it gets renewed when installing a new app, then mail container will
still get it.
This commit is contained in:
Girish Ramakrishnan
2019-03-04 15:20:58 -08:00
parent f6213595d1
commit da2b00c9cf
4 changed files with 24 additions and 21 deletions
+5
View File
@@ -25,6 +25,7 @@ exports = module.exports = {
startMail: restartMail,
restartMail: restartMail,
handleCertChanged: handleCertChanged,
sendTestMail: sendTestMail,
@@ -690,6 +691,10 @@ function restartMailIfActivated(callback) {
});
}
function handleCertChanged(callback) {
restartMailIfActivated(callback);
}
function getDomain(domain, callback) {
assert.strictEqual(typeof domain, 'string');
assert.strictEqual(typeof callback, 'function');