move server routes into /system

This commit is contained in:
Girish Ramakrishnan
2023-08-04 13:41:13 +05:30
parent 1264cd1dd7
commit 2cdbf4d2c5
12 changed files with 457 additions and 509 deletions

View File

@@ -31,6 +31,7 @@ const appHealthMonitor = require('./apphealthmonitor.js'),
dyndns = require('./dyndns.js'),
eventlog = require('./eventlog.js'),
janitor = require('./janitor.js'),
mail = require('./mail.js'),
network = require('./network.js'),
paths = require('./paths.js'),
safe = require('safetydance'),
@@ -45,6 +46,7 @@ const gJobs = {
backup: null,
updateChecker: null,
systemChecks: null,
mailStatusCheck: null,
diskSpaceChecker: null,
certificateRenew: null,
cleanupBackups: null,
@@ -95,13 +97,19 @@ async function startJobs() {
gJobs.systemChecks = new CronJob({
cronTime: `00 ${minute} 2 * * *`, // once a day. if you change this interval, change the notification messages with correct duration
onTick: async () => await safe(cloudron.runSystemChecks(), { debug }),
onTick: async () => await safe(system.runSystemChecks(), { debug }),
start: true
});
gJobs.mailStatusCheck = new CronJob({
cronTime: `00 ${minute} 2 * * *`, // once a day. if you change this interval, change the notification messages with correct duration
onTick: async () => await safe(mail.checkStatus(), { debug }),
start: true
});
gJobs.diskUsage = new CronJob({
cronTime: `00 ${minute} 3 * * *`, // once a day
onTick: async () => await safe(cloudron.updateDiskUsage(), { debug }),
onTick: async () => await safe(system.updateDiskUsage(), { debug }),
start: true
});