tls addon: restart apps on cert change

This commit is contained in:
Girish Ramakrishnan
2021-02-18 09:43:42 -08:00
parent 2f58092af2
commit a5c4b5d8a1

View File

@@ -678,7 +678,13 @@ function renewCerts(options, auditSource, progressCallback, callback) {
async.series([
(next) => { return renewed.includes(settings.mailFqdn()) ? mail.handleCertChanged(next) : next(); },// mail cert renewed
reload // reload nginx if any certs were updated but the config was not rewritten
reload, // reload nginx if any certs were updated but the config was not rewritten
(next) => { // restart tls apps on cert change
const tlsApps = allApps.filter(app => app.manifest.addons && app.manifest.addons.tls && renewed.includes(app.fqdn));
async.eachSeries(tlsApps, function (app, iteratorDone) {
apps.restart(app, auditSource, () => iteratorDone());
}, next);
}
], callback);
});
});