notifications: server reboot email
This commit is contained in:
@@ -11,6 +11,7 @@ exports = module.exports = {
|
||||
appDown,
|
||||
appUp,
|
||||
oomEvent,
|
||||
rebootRequired,
|
||||
|
||||
sendTestMail,
|
||||
|
||||
@@ -262,6 +263,21 @@ async function backupFailed(mailTo, errorMessage, logUrl) {
|
||||
await sendMail(mailOptions);
|
||||
}
|
||||
|
||||
async function rebootRequired(mailTo) {
|
||||
assert.strictEqual(typeof mailTo, 'string');
|
||||
|
||||
const mailConfig = await getMailConfig();
|
||||
|
||||
const mailOptions = {
|
||||
from: mailConfig.notificationFrom,
|
||||
to: mailTo,
|
||||
subject: `[${mailConfig.cloudronName}] Reboot required for security updates`,
|
||||
text: render('reboot_required-text.ejs', { webadminUrl: `https://${mailConfig.dashboardFqdn}`, notificationsUrl: mailConfig.notificationsUrl })
|
||||
};
|
||||
|
||||
await sendMail(mailOptions);
|
||||
}
|
||||
|
||||
async function certificateRenewalError(mailTo, domain, message) {
|
||||
assert.strictEqual(typeof mailTo, 'string');
|
||||
assert.strictEqual(typeof domain, 'string');
|
||||
|
||||
Reference in New Issue
Block a user