mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 22:25:52 -05:00
Automatic set of npmpath if possible.
This commit is contained in:
parent
31e0f5c726
commit
908b308c30
@ -1247,6 +1247,15 @@ function CreateMeshCentralServer(config, args) {
|
||||
if (obj.config.settings.autobackup && (typeof obj.config.settings.autobackup.backupintervalhours == 'number')) {
|
||||
setInterval(obj.db.performBackup, obj.config.settings.autobackup.backupintervalhours * 60 * 60 * 1000);
|
||||
}
|
||||
|
||||
// Setup the Node+NPM path if possible, this makes it possible to update the server even if NodeJS and NPM are not in default paths.
|
||||
if (obj.args.npmpath == null) {
|
||||
try {
|
||||
var nodepath = process.argv[0];
|
||||
var npmpath = obj.path.join(obj.path.dirname(process.argv[0]), 'npm');
|
||||
if (obj.fs.existsSync(nodepath) && obj.fs.existsSync(npmpath)) { obj.args.npmpath = (nodepath + ' ' + npmpath); }
|
||||
} catch (ex) { }
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.4.8-l",
|
||||
"version": "0.4.8-m",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
Loading…
Reference in New Issue
Block a user