mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-02-09 08:43:36 +01:00
Merge pull request #12271 from Security-Onion-Solutions/suripcap
Suricata PCAP
This commit is contained in:
@@ -5,13 +5,17 @@
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
|
||||
|
||||
{%- if GLOBALS.pcap_engine == "SURICATA" %}
|
||||
PCAPLOC=/host/nsm/suripcap
|
||||
{%- else %}
|
||||
PCAPLOC=/host/nsm/pcap
|
||||
{%- endif %}
|
||||
|
||||
# if this script isn't already running
|
||||
if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
||||
|
||||
# Get the data
|
||||
OLDPCAP=$(find /host/nsm/pcap -type f -exec stat -c'%n %Z' {} + | sort | grep -v "\." | head -n 1 | awk {'print $2'})
|
||||
OLDPCAP=$(find $PCAPLOC -type f -exec stat -c'%n %Z' {} + | sort | grep -v "/\." | head -n 1 | awk {'print $2'})
|
||||
DATE=$(date +%s)
|
||||
AGE=$(($DATE - $OLDPCAP))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user