1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

Updated service-manager, so on systemd platforms, it does a systemctl --system daemon-reload after writing the service configuration.

This commit is contained in:
Bryan Roe
2021-09-07 16:58:49 -07:00
parent c5e347335e
commit 5fd8d5fd3c
2 changed files with 12 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2737,11 +2737,18 @@ function serviceManager()
this._update = require('child_process').execFile('/bin/sh', ['sh']);
this._update._moduleName = options.name;
this._update.stdout.on('data', function (chunk) { });
this._update.stdin.write('systemctl --system daemon-reload\n');
this._update.stdin.write('systemctl enable ' + options.name + '.service\n');
this._update.stdin.write('exit\n');
this._update.waitExit();
default:
conf.end();
this._update = require('child_process').execFile('/bin/sh', ['sh']);
this._update._moduleName = options.name;
this._update.stdout.on('data', function (chunk) { });
this._update.stdin.write('systemctl --system daemon-reload\n');
this._update.stdin.write('exit\n');
this._update.waitExit();
break;
}
break;