mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
improve consistency
This commit is contained in:
@@ -299,7 +299,8 @@ fail() {
|
|||||||
|
|
||||||
get_agent_count() {
|
get_agent_count() {
|
||||||
if [ -f /opt/so/log/agents/agentstatus.log ]; then
|
if [ -f /opt/so/log/agents/agentstatus.log ]; then
|
||||||
AGENTCOUNT=$(cat /opt/so/log/agents/agentstatus.log | grep -wF active | awk '{print $2}')
|
AGENTCOUNT=$(cat /opt/so/log/agents/agentstatus.log | grep -wF active | awk '{print $2}' | sed 's/,//')
|
||||||
|
[[ -z "$AGENTCOUNT" ]] && AGENTCOUNT="0"
|
||||||
else
|
else
|
||||||
AGENTCOUNT=0
|
AGENTCOUNT=0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ def check_for_fps():
|
|||||||
result = subprocess.run([feat_full + '-mode-setup', '--is-enabled'], stdout=subprocess.PIPE)
|
result = subprocess.run([feat_full + '-mode-setup', '--is-enabled'], stdout=subprocess.PIPE)
|
||||||
if result.returncode == 0:
|
if result.returncode == 0:
|
||||||
fps = 1
|
fps = 1
|
||||||
except FileNotFoundError:
|
except:
|
||||||
fn = '/proc/sys/crypto/' + feat_full + '_enabled'
|
fn = '/proc/sys/crypto/' + feat_full + '_enabled'
|
||||||
try:
|
try:
|
||||||
with open(fn, 'r') as f:
|
with open(fn, 'r') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user