37 lines
677 B
Bash
Executable File
37 lines
677 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
LAB_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
REPO_ROOT="$(cd "$LAB_DIR/../.." && pwd)"
|
|
|
|
source "$SCRIPT_DIR/config.sh"
|
|
source "$REPO_ROOT/shared/minicorp/lib/minicorp.sh"
|
|
source "$REPO_ROOT/shared/minicorp/topologies/client-router-server.sh"
|
|
|
|
printf '\n'
|
|
mc_log "Resetting $LAB_NAME"
|
|
|
|
#
|
|
# Remove runtime
|
|
#
|
|
|
|
mc_topology_client_router_server_down
|
|
|
|
rm -f \
|
|
"$LAB_WEB_STDOUT" \
|
|
"$LAB_STATUS_STDOUT" \
|
|
"$LAB_ADMIN_STDOUT"
|
|
|
|
#
|
|
# Clear investigation evidence
|
|
#
|
|
|
|
if [[ -f "$LAB_EVIDENCE_LOG" ]]; then
|
|
: > "$LAB_EVIDENCE_LOG"
|
|
fi
|
|
|
|
printf '\n'
|
|
mc_log "$LAB_NAME has been reset."
|