Create script to grab topology peers
Move to your scripts directory and open the new script:
Copy/paste the following lines into the new script topology_push.sh:
curl -s -o /home/cardano/cardano-node/configuration/relay1/mainnet_candidate-topology.json "https://api.clio.one/htopology/v1/fetch/?max=7&customPeers=CoreIP:3000:4|Relay2:3002|relays-new.mainnet-candidate.dev.cardano.org:3001:2"
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 topology_push.sh
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.