From 3427f242f10d06b04605800a4a613ee535e59dff Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 9 Jan 2020 16:41:14 -0800 Subject: [PATCH] Linux systemd isntall fix. --- meshcentral.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meshcentral.js b/meshcentral.js index bf1575c5..7911d4a7 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -213,18 +213,21 @@ function CreateMeshCentralServer(config, args) { if ((err != null) && (err != '')) { console.log('ERROR: Unable to start MeshCentral: ' + err); process.exit(); return; } console.log('Done.'); }); + return; } else if (obj.args.stop == true) { // Stop MeshCentral in Systemd require('child_process').exec('sudo systemctl stop meshcentral.service', {}, function (err, stdout, stderr) { if ((err != null) && (err != '')) { console.log('ERROR: Unable to stop MeshCentral: ' + err); process.exit(); return; } console.log('Done.'); }); + return; } else if (obj.args.restart == true) { // Restart MeshCentral in Systemd require('child_process').exec('sudo systemctl restart meshcentral.service', {}, function (err, stdout, stderr) { if ((err != null) && (err != '')) { console.log('ERROR: Unable to restart MeshCentral: ' + err); process.exit(); return; } console.log('Done.'); }); + return; } }