Merge remote-tracking branch 'origin/stable'

This commit is contained in:
zadam 2021-01-14 21:53:05 +01:00
commit cbc1f63732
3 changed files with 11 additions and 1 deletions

View File

@ -5,6 +5,9 @@ instanceName=
# set to true to allow using Trilium without authentication (makes sense for server build only, desktop build doesn't need password)
noAuthentication=false
# set to true to disable backups (e.g. because of limited space on server)
noBackup=false
# Disable automatically generating desktop icon
# noDesktopIcon=true

View File

@ -1 +1 @@
module.exports = { buildDate:"2021-01-11T22:29:31+01:00", buildRevision: "369274ead75947a68bf7bbb5ab1e784e81521030" };
module.exports = { buildDate:"2021-01-11T22:47:11+01:00", buildRevision: "6afc299efb616d47c72b5f58ab2827c0e3e121c2" };

View File

@ -9,6 +9,7 @@ const Option = require('../entities/option');
const TaskContext = require('./task_context.js');
const migrationService = require('./migration');
const cls = require('./cls');
const config = require('./config');
const dbReady = utils.deferred();
@ -133,6 +134,12 @@ function setDbAsInitialized() {
}
dbReady.then(() => {
if (config.General && config.General.noBackup === true) {
log.info("Disabling scheduled backups.");
return;
}
setInterval(() => require('./backup').regularBackup(), 4 * 60 * 60 * 1000);
// kickoff first backup soon after start up