mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Monitor interface will not always be bond0 - pull correct value from pillar; Replay test data after automated test installations complete.
This commit is contained in:
@@ -20,9 +20,11 @@
|
||||
. /usr/sbin/so-common
|
||||
. /usr/sbin/so-image-common
|
||||
|
||||
REPLAYIFACE=${REPLAYIFACE:-bond0}
|
||||
REPLAYIFACE=${REPLAYIFACE:-$(lookup_pillar interface sensor)}
|
||||
REPLAYSPEED=${REPLAYSPEED:-10}
|
||||
|
||||
mkdir -p /opt/so/samples
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Replays one or more PCAP sample files to the Security Onion monitoring interface."
|
||||
echo
|
||||
@@ -48,8 +50,6 @@ if ! docker ps | grep -q so-tcpreplay; then
|
||||
TRUSTED_CONTAINERS=("so-tcpreplay")
|
||||
update_docker_containers "tcpreplay"
|
||||
so-tcpreplay-start || fail "Unable to initialize tcpreplay"
|
||||
mkdir -p /opt/so/samples
|
||||
docker cp so-tcpreplay:/opt/samples/* /opt/so/samples
|
||||
fi
|
||||
|
||||
echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface ${REPLAYIFACE}..."
|
||||
|
||||
@@ -842,6 +842,8 @@ if [[ -n $SO_ERROR ]]; then
|
||||
else
|
||||
echo "Successfully completed setup! Continuing with post-installation steps" >> $setup_log 2>&1
|
||||
{
|
||||
[ -n "$TESTING" ] && so-test
|
||||
|
||||
export percentage=95 # set to last percentage used in previous subshell
|
||||
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||
set_progress_str 97 "Running so-allow -${ALLOW_ROLE} for ${ALLOW_CIDR}"
|
||||
|
||||
Reference in New Issue
Block a user