mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-19 01:33:18 +00:00
Updated OpenBSD service installer to set AUTO_START when flagged
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2498,6 +2498,13 @@ function serviceManager()
|
|||||||
|
|
||||||
require('fs').copyFileSync(process.execPath, options.installPath + options.target + '_loader');
|
require('fs').copyFileSync(process.execPath, options.installPath + options.target + '_loader');
|
||||||
require('fs').chmodSync(options.installPath + options.target + '_loader', m);
|
require('fs').chmodSync(options.installPath + options.target + '_loader', m);
|
||||||
|
if(options.startType == 'AUTO_START' || options.startType == 'BOOT_START')
|
||||||
|
{
|
||||||
|
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||||
|
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||||
|
child.stdin.write("rcctl enable " + options.name + "\nexit\n");
|
||||||
|
child.waitExit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this.pfSense || this.OPNsense) && (options.startType == 'AUTO_START' || options.startType == 'BOOT_START'))
|
if ((this.pfSense || this.OPNsense) && (options.startType == 'AUTO_START' || options.startType == 'BOOT_START'))
|
||||||
@@ -3158,6 +3165,10 @@ function serviceManager()
|
|||||||
catch(e)
|
catch(e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||||
|
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||||
|
child.stdin.write("rcctl disable " + name + "\nexit\n");
|
||||||
|
child.waitExit();
|
||||||
}
|
}
|
||||||
if (this.pfSense)
|
if (this.pfSense)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user