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:
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user