Skip to content

Commit

Permalink
Fixed paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristure committed Mar 20, 2024
1 parent e3cd364 commit d3cf4f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 7 additions & 1 deletion scripts/docker-testnet/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

set -eux

pushd ../..
export DOCKERTESTNETDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

MULTIVERSXTESTNETSCRIPTSDIR="$(dirname "$DOCKERTESTNETDIR")/testnet"

source "$DOCKERTESTNETDIR/variables.sh"

cd ${MULTIVERSXDIR}

docker build -f docker/seednode/Dockerfile . -t seednode:dev

Expand Down
6 changes: 4 additions & 2 deletions scripts/docker-testnet/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

set -eux

file_path="./tmp/stopped_containers"
export DOCKERTESTNETDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

file_path="${DOCKERTESTNETDIR}/tmp/stopped_containers"

# Check if the file exists
if [ ! -f "$file_path" ]; then
Expand All @@ -15,4 +17,4 @@ while IFS= read -r line; do
docker start $line
done < "$file_path"

rmdir ./tmp
rm -rf "${DOCKERTESTNETDIR}/tmp"
4 changes: 2 additions & 2 deletions scripts/docker-testnet/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ source "$MULTIVERSXTESTNETSCRIPTSDIR/variables.sh"
# Get the IDs of containers attached to the network
export CONTAINER_IDS=$(docker network inspect -f '{{range $k, $v := .Containers}}{{printf "%s\n" $k}}{{end}}' "$DOCKER_NETWORK_NAME")

mkdir -p ./tmp
mkdir -p "$MULTIVERSXTESTNETSCRIPTSDIR/tmp"

# Stop each container
echo "Stopping containers..."
for CONTAINER_ID in $CONTAINER_IDS; do
docker stop "$CONTAINER_ID"
echo "$CONTAINER_ID" >> ./tmp/stopped_containers
echo "$CONTAINER_ID" >> "$MULTIVERSXTESTNETSCRIPTSDIR/tmp/stopped_containers"
done

0 comments on commit d3cf4f8

Please sign in to comment.