Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Support relative/full path script invocation #8

Open
wants to merge 1 commit into
base: stage0-testnet
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: 10 additions & 2 deletions bor-config/start.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/usr/bin/env sh

BOR_CONFIG_DIR=`dirname $0`

cd $BOR_CONFIG_DIR

ADDRESS=0xcfbC26591Af0DAe88aa7AE14D0EcAceD8f679976
INSTANCE_DIR=$PWD/dataDir
BUILD_DIR=$GOPATH/src/github.com/maticnetwork/bor/build/bin

$BUILD_DIR/bor --datadir $INSTANCE_DIR init genesis.json
# set -x #echo on

touch $INSTANCE_DIR/bor/static-nodes.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required.

In the steps below, static-nodes.json is copied before start.sh is called.
https://docs.matic.network/staking/join-public-testnet/


mkdir -p logs
LOG_FILE=logs/bor.log

$BUILD_DIR/bor --datadir $INSTANCE_DIR \
--port 30303 \
Expand All @@ -24,6 +30,8 @@ $BUILD_DIR/bor --datadir $INSTANCE_DIR \
--unlock $ADDRESS \
--password password.txt \
--allow-insecure-unlock \
--mine > logs/bor.log 2>&1 &
--mine > $LOG_FILE 2>&1 &

LOG_FULL_PATH=$(cd logs && pwd -P)/`basename $LOG_FILE`

echo "Node started! Logs are being written to logs/bor.log"
echo "Node started! Logs are being written to ${LOG_FULL_PATH}"