backups: add backup daemon to run every n minutes, keep x most recent backups

This commit is contained in:
Harvey Tindall
2023-12-21 13:03:16 +00:00
parent c0c91b4aad
commit 733ab37539
5 changed files with 162 additions and 1 deletions
+7
View File
@@ -475,6 +475,13 @@ func start(asDaemon, firstCall bool) {
go app.checkForUpdates()
}
var backupDaemon *housekeepingDaemon
if app.config.Section("backups").Key("enabled").MustBool(false) {
backupDaemon = newBackupDaemon(app)
go backupDaemon.run()
defer backupDaemon.Shutdown()
}
if telegramEnabled {
app.telegram, err = newTelegramDaemon(app)
if err != nil {