New script run.sh

I’ve followed in the past the tutorial “How to host a Virtual Node” and when downloading the script run.sh from this url:

https://node.incognito.org/run.sh

I’ve got a script that begins with:

#!/bin/sh bash

run()
{
  validator_key=xxx
  bootnode="mainnet-bootnode.incognito.org:9330"
  is_shipping_logs=0
  latest_tag=$1
  current_tag=$2
  data_dir="data"
  eth_data_dir="eth-mainnet-data"
  eth_data_dir_geth="eth-mainnet-data-geth"
  logshipper_data_dir="logshipper-mainnet-data"
  backup_log=0

but now the script that download from here begins with:

#!/bin/sh bash

run()
{
  validator_key=xxx
  bootnode="testnet-bootnode.incognito.org:9330"
  is_shipping_logs=1
  latest_tag=$1
  current_tag=$2
  data_dir="data"
  eth_data_dir="eth-kovan-data"
  logshipper_data_dir="logshipper-data"

I think that the current one is for testnet.

Can I keep running the first one or the script has to be updated? Also the tutorial has to be updated to connect to mainnet?

Now, when restarting the Node I rerun the same run.sh with xxx changed with the validator key as in the tutorial without redownload the script every time, is this correct?

Thanks in advance.
Enrico

3 Likes

Hi @Robotron2084, thanks for your message. The first one is the correct script. You can keep using the first one as it can updated itself.

If you want to set up another one, please wait a moment. The script run.sh here is not correct. We will upload a new script so you can setup normally by using this command:
curl https://node.incognito.org/run.sh > run.sh

That’s correct. Simply using this one: sudo bash run.sh

2 Likes

Hi @Robotron2084, The file is updated. This is the correct command to download.

curl -LO https://node.incognito.org/run.sh > run.sh

I updated this post, too: How to host a Virtual Node

Let me know how it works for you.

1 Like

Ok, script seems ok now. I’ll try as soon as possible.

I think there is a missing blank in this part of the post before run.sh:
sed -i s/xxx/validator_key/ run.sh

Thank you very much.
Enrico

2 Likes

Thank you, I edited it.

1 Like

Hi @Peter, I saw your comment and it made me think… “Am I running on the testnet or main-net?”

I have these 3 containers running inside docker:

  1. inc_miner
  2. inc_kovan
  3. inc_logshipper

I thought I read somewhere that “kovan” indicates testnet, but I wanted to check with you if that is right.

If that is the case does this mean I’m running on the testnet?
If this is not right, how do I check if my node is on mainnet?

Thanks.

1 Like

Check in the first lines of the run.sh script just below your validator key what is the bootnode= line.
You can use an editor like nano or vi:
nano run.sh
If It contains testnet you can follow instructions again here:

(Edited:)
Also before remove your

  data_dir="data"
  eth_data_dir="eth-kovan-data"
  logshipper_data_dir="logshipper-data"

for example with:

sudo rm -rf data
sudo rm -rf eth-kovan-data
sudo rm -rf logshipper-data
5 Likes