mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-28 15:37:51 +02:00
Rename functions to avoid naming conflict with setup vars
This commit is contained in:
@@ -47,25 +47,25 @@ if ! docker ps | grep -q so-tcpreplay; then
|
||||
echo "Replay functionality not enabled; attempting to enable now (may require Internet access)..."
|
||||
echo
|
||||
|
||||
if is_manager; then
|
||||
if is_manager_node; then
|
||||
TRUSTED_CONTAINERS=("so-tcpreplay")
|
||||
mkdir -p /opt/so/log/tcpreplay
|
||||
update_docker_containers "tcpreplay" "" "" "/opt/so/log/tcpreplay/init.log"
|
||||
fi
|
||||
if is_sensor; then
|
||||
if ! is_manager; then
|
||||
if is_sensor_node; then
|
||||
if ! is_manager_node; then
|
||||
echo "Attempting to start replay container. If this fails then you may need to run this command on the manager first."
|
||||
fi
|
||||
so-tcpreplay-start || fail "Unable to initialize tcpreplay"
|
||||
fi
|
||||
fi
|
||||
|
||||
if is_sensor; then
|
||||
if is_sensor_node; then
|
||||
echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface ${REPLAYIFACE}..."
|
||||
docker exec so-tcpreplay /usr/bin/bash -c "/usr/local/bin/tcpreplay -i ${REPLAYIFACE} -M${REPLAYSPEED} $@"
|
||||
|
||||
echo "Replay completed. Warnings shown above are typically expected."
|
||||
elif is_manager; then
|
||||
elif is_manager_node; then
|
||||
echo "The sensor nodes in this grid can now replay traffic."
|
||||
else
|
||||
echo "Unable to replay traffic since this node is not a sensor node."
|
||||
|
||||
Reference in New Issue
Block a user