Create script to grab topology peers

Creating the script

Move to your scripts directory and open the new script:

cd ~/cardano-node/scripts

Copy/paste the following lines into the new script

curl -s -o /home/cardano/cardano-node/configuration/relay1/mainnet_candidate-topology.json "|Relay2:3002|"

the topology.json file name changes on each new genesis as well as the relays-new address. If in doubt, check your topology file name and open the new topology file for the current genesis and see what relays-new address it shows.

Now we need to edit the script, check the picture below to see what items need changed:

Save the changes by pressing: ctrl+o Then Enter exit editor: ctrl+x

Once you are done with the edits, we can test it out after topologyUpdater has ran successfully for 3 hours you will be able to use this new script. Let's set the execute permissions:

chmod +x

Once you have been running topologyUpdater for 3 hours (check your logs) you can manually execute the following:


This will go out, pull relay peers in the topology and automatically update your topology file.

Remember you MUST close the relay then restart it for the relay to read this new topology file.