1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 21:33:38 +00:00

Updated OpenBSD service installer to set AUTO_START when flagged

This commit is contained in:
Bryan Roe
2021-08-31 18:40:22 -07:00
parent c7d0a827e7
commit e8c2d57af8
2 changed files with 16 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2498,6 +2498,13 @@ function serviceManager()
require('fs').copyFileSync(process.execPath, options.installPath + options.target + '_loader');
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'))
@@ -3158,6 +3165,10 @@ function serviceManager()
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)
{