mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
add LSHOSTNAME option to so-minion. use -L in sominion_setup reactor
This commit is contained in:
@@ -75,6 +75,10 @@ for i in "$@"; do
|
|||||||
ES_HEAP_SIZE="${i#*=}"
|
ES_HEAP_SIZE="${i#*=}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-L=*|--lshostname=*)
|
||||||
|
LSHOSTNAME="${i#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-l=*|--lsheap=*)
|
-l=*|--lsheap=*)
|
||||||
LSHEAP="${i#*=}"
|
LSHEAP="${i#*=}"
|
||||||
shift
|
shift
|
||||||
|
|||||||
@@ -9,12 +9,14 @@ import logging
|
|||||||
from subprocess import call
|
from subprocess import call
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
logging.debug('sominion_setup_reactor: Running')
|
log.info('sominion_setup_reactor: Running')
|
||||||
minionid = data['id']
|
minionid = data['id']
|
||||||
DATA = data['data']
|
DATA = data['data']
|
||||||
hv_name = DATA['HYPERVISOR_HOST']
|
hv_name = DATA['HYPERVISOR_HOST']
|
||||||
logging.debug('sominion_setup_reactor: DATA: %s' % DATA)
|
log.info('sominion_setup_reactor: DATA: %s' % DATA)
|
||||||
|
|
||||||
# Build the base command
|
# Build the base command
|
||||||
cmd = "NODETYPE=" + DATA['NODETYPE'] + " /usr/sbin/so-minion -o=addVM -m=" + minionid + " -n=" + DATA['MNIC'] + " -i=" + DATA['MAINIP'] + " -c=" + str(DATA['CPUCORES']) + " -d='" + DATA['NODE_DESCRIPTION'] + "'"
|
cmd = "NODETYPE=" + DATA['NODETYPE'] + " /usr/sbin/so-minion -o=addVM -m=" + minionid + " -n=" + DATA['MNIC'] + " -i=" + DATA['MAINIP'] + " -c=" + str(DATA['CPUCORES']) + " -d='" + DATA['NODE_DESCRIPTION'] + "'"
|
||||||
@@ -32,9 +34,12 @@ def run():
|
|||||||
if 'LS_HEAP_SIZE' in DATA:
|
if 'LS_HEAP_SIZE' in DATA:
|
||||||
cmd += " -l=" + DATA['LS_HEAP_SIZE']
|
cmd += " -l=" + DATA['LS_HEAP_SIZE']
|
||||||
|
|
||||||
logging.debug('sominion_setup_reactor: Command: %s' % cmd)
|
if 'LSHOSTNAME' in DATA:
|
||||||
|
cmd += " -L=" + DATA['LSHOSTNAME']
|
||||||
|
|
||||||
|
log.info('sominion_setup_reactor: Command: %s' % cmd)
|
||||||
rc = call(cmd, shell=True)
|
rc = call(cmd, shell=True)
|
||||||
|
|
||||||
logging.info('sominion_setup_reactor: rc: %s' % rc)
|
log.info('sominion_setup_reactor: rc: %s' % rc)
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|||||||
Reference in New Issue
Block a user