1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved messages when using autobackup command in MyServer console.

This commit is contained in:
Ylian Saint-Hilaire 2020-09-08 13:02:05 -07:00
parent 483efb88fc
commit fb0994e77e
2 changed files with 35 additions and 13 deletions

View file

@ -1197,7 +1197,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
break;
}
case 'autobackup': {
var backupResult = parent.db.performBackup();
var backupResult = parent.db.performBackup(function (msg) {
try { ws.send(JSON.stringify({ action: 'serverconsole', value: msg, tag: command.tag })); } catch (ex) { }
});
if (backupResult == 0) { r = 'Starting auto-backup...'; } else { r = 'Backup alreay in progress.'; }
break;
}