github.com/MetalBlockchain/metalgo@v1.11.9/.github/workflows/cleanup-net-outage-sim.sh (about) 1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 ### 6 # cleanup removes the docker instance and the network 7 echo "Cleaning up..." 8 # shellcheck disable=SC2046 9 docker rm $(sudo docker stop $(sudo docker ps -a -q --filter ancestor=metalblockchain/metalgo:latest --format="{{.ID}}")) #if the filter returns nothing the command fails, so ignore errors 10 docker network rm controlled-net 11 rm /opt/mainnet-db-daily* 2>/dev/null 12 rm -rf /var/lib/metalgo 2>/dev/null 13 echo "Done cleaning up"