Skip to content

Commit

Permalink
update scritp
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaisc committed Aug 22, 2024
1 parent 911b3d8 commit 5ff643f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ We recommend the following minimum requirements, although you may be be able to

## Option 1: Running Ocean Nodes in Docker (recommended)

[This readme](deployment/Readme.md) is the recommended way to host a node and be eligible for incentives.
[This readme](deployment/Readme.md) is the recommended way to host a node and be eligible for incentives.
The other options are more recommended towards deleveopers that want to tinker.


## Option 2: Running local build of Ocean Nodes in Docker

Build and run the node using Docker:
Expand Down Expand Up @@ -86,7 +85,7 @@ npm run build # Build the Project

#### Option 1: Automatic Setup (Recommended)

Run the helper script to generate and set up the recommended environment variables:
Run the helper script to generate and set up the minimum required environment variables:

```bash
./src/helpers/scripts/setupNodeEnv.sh
Expand Down
26 changes: 5 additions & 21 deletions src/helpers/scripts/setupNodeEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,6 @@ setup_node_admin_wallet() {
fi
}

ask_for_same_admin_wallet() {

wallet_file_path=$wallet_file
if [ -f $wallet_file_path ]; then
read -p "Do you want to use the wallet associated with this key ( $wallet_file ) as a node admin account? [ y/n ]: " use_admin_wallet
use_admin_wallet=${use_admin_wallet:-y}
if [ "$use_admin_wallet" == 'y' ]; then
ADMIN_WALLET=`cat $wallet_file_path`
setup_node_admin_wallet
fi
fi
}

#check if the private key file exists
if ! [ -f $pk_file_path ]; then
echo "Private Key File does not exist."
Expand Down Expand Up @@ -224,15 +211,12 @@ if [ $exists_env_file -eq 0 ]; then
#configure the pk key on the .env file
setup_private_key
#Use wallet address from file? only if we just created it
if [ $created_pk_file -eq 1 ]; then
ask_for_same_admin_wallet
else
read -p "Enter your admin wallet address: " ADMIN_WALLET
check_wallet $ADMIN_WALLET
setup_node_admin_wallet
fi
read -p "Enter your admin wallet address: " ADMIN_WALLET
check_wallet $ADMIN_WALLET
setup_node_admin_wallet

fi
else
else ``
echo "Creating .env file aborted!"
created_env_file=0
exit 1
Expand Down

0 comments on commit 5ff643f

Please sign in to comment.