Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linux local setup script to open new terminal sessions #3271

Open
wants to merge 2 commits into
base: v8/release/devnet
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions tools/local-network-setup/setup-linux-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ then
echo ================================
echo ====== Starting hardhat1 ======
echo ================================
sh -c "cd $pathToOtNode && node tools/local-network-setup/run-local-blockchain.js 8545 :v2" &
x-terminal-emulator -e "bash -c 'cd $pathToOtNode && node tools/local-network-setup/run-local-blockchain.js 8545 :v2; exec bash'" &
echo Waiting for hardhat to start and contracts deployment

echo ================================
echo ====== Starting hardhat 2 ======
echo ================================
sh -c "cd $pathToOtNode && node tools/local-network-setup/run-local-blockchain.js 9545 :v2" &
x-terminal-emulator -e "bash -c 'cd $pathToOtNode && node tools/local-network-setup/run-local-blockchain.js 9545 :v2; exec bash'" &
echo Waiting for hardhat to start and contracts deployment
fi

Expand All @@ -63,14 +63,14 @@ echo ====== Generating configs ======
echo ================================

node $pathToOtNode/tools/local-network-setup/generate-config-files.js $numberOfNodes $network $tripleStore $hubContractAddress
sleep 5
sleep 60
echo ================================
echo ======== Starting nodes ========
echo ================================

startNode() {
echo Starting node $1
sh -c "cd $pathToOtNode && node index.js ./tools/local-network-setup/.node$1_origintrail_noderc.json" &
x-terminal-emulator -e "bash -c 'cd $pathToOtNode && node index.js ./tools/local-network-setup/.node$1_origintrail_noderc.json; exec bash'" &
}

i=0
Expand All @@ -79,7 +79,3 @@ do
startNode $i
((i = i + 1))
done

wait
# Close started background processes when done (https://stackoverflow.com/a/2173421)
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
Loading