mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 22:17:31 +03:00
Merge branch 'master' of https://github.com/Ylianst/MeshCentral
This commit is contained in:
commit
0ca33090bb
6
db.js
6
db.js
@ -1606,7 +1606,8 @@ module.exports.CreateDB = function (parent, func) {
|
||||
cmd += (parent.platform == 'win32') ? ' --password=\"' + props.password + '\"' : ' --password=\'' + props.password + '\'';
|
||||
if (props.host) { cmd += ' -h ' + props.host; }
|
||||
if (props.port) { cmd += ' -P ' + props.port; }
|
||||
cmd += ' meshcentral > ' + ((parent.platform == 'win32') ? '\"nul\"' : '\"/dev/null\"');
|
||||
var dbname = (props.database) ? props.database : 'meshcentral';
|
||||
cmd += ' ' + dbname + ' > ' + ((parent.platform == 'win32') ? '\"nul\"' : '\"/dev/null\"');
|
||||
const child_process = require('child_process');
|
||||
child_process.exec(cmd, { cwd: backupPath }, function(error, stdout, stdin) {
|
||||
try {
|
||||
@ -1806,7 +1807,8 @@ module.exports.CreateDB = function (parent, func) {
|
||||
cmd += (parent.platform == 'win32') ? ' --password=\"' + props.password + '\"' : ' --password=\'' + props.password + '\'';
|
||||
if (props.host) { cmd += ' -h ' + props.host; }
|
||||
if (props.port) { cmd += ' -P ' + props.port; }
|
||||
cmd += ' meshcentral --result-file=\"' + newBackupPath + '.sql\"';
|
||||
var sqldbname = (props.database) ? props.database : 'meshcentral';
|
||||
cmd += ' ' + sqldbname + ' --result-file=\"' + newBackupPath + '.sql\"';
|
||||
const child_process = require('child_process');
|
||||
var backupProcess = child_process.exec(cmd, { cwd: backupPath }, function (error, stdout, stderr) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user