mail: restart apps using email addon
move this logic from frontend to backend
This commit is contained in:
@@ -8,6 +8,7 @@ exports = module.exports = {
|
||||
onDashboardLocationSet,
|
||||
onDashboardLocationChanged,
|
||||
onMailServerLocationChanged,
|
||||
onMailServerIncomingDomainsChanged,
|
||||
|
||||
getStatus
|
||||
};
|
||||
@@ -251,3 +252,12 @@ async function onMailServerLocationChanged(auditSource) {
|
||||
const appsUsingEmail = installedApps.filter((a) => !!a.manifest.addons?.email || a.manifest.addons?.sendmail?.requiresValidCertificate);
|
||||
await safe(apps.configureApps(appsUsingEmail, { scheduleNow: true }, auditSource), { debug });
|
||||
}
|
||||
|
||||
async function onMailServerIncomingDomainsChanged(auditSource) {
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
// mark apps using email addon to be reconfigured
|
||||
const [, installedApps] = await safe(apps.list());
|
||||
const appsUsingEmail = installedApps.filter((a) => !!a.manifest.addons?.email);
|
||||
await safe(apps.configureApps(appsUsingEmail, { scheduleNow: true }, auditSource), { debug });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user