Add lab-01-trace-request
This commit is contained in:
1 parent
576d56d39b
commit
101095d35a
6 files changed
+285
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/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"
|
||||
|
||||
# Stop services and remove the MiniCorp network namespaces.
|
||||
mc_topology_client_router_server_down
|
||||
|
||||
# Remove the namespace-specific resolver configuration.
|
||||
sudo rm -f "$LAB_CLIENT_RESOLV_CONF"
|
||||
sudo rmdir "$LAB_CLIENT_RESOLV_DIR" 2>/dev/null || true
|
||||
|
||||
# Remove temporary service output.
|
||||
sudo rm -f \
|
||||
"$LAB_WEB_STDOUT" \
|
||||
"$LAB_DNS_STDOUT"
|
||||
|
||||
printf '\n'
|
||||
mc_log "$LAB_NAME has been reset."
|
||||
Reference in new issue
Block a user