0691c22db4
* fist commit
* manual peer connect
* add build to gitignore
* add shared volume
* connect to bootnode
* fix volume init bug
* todo generate genesis
* remove build dir
---------
Co-authored-by: iskay <ian@knowable.vc>
Former-commit-id: 5ecfcae5cc
25 lines
727 B
Bash
25 lines
727 B
Bash
#!/bin/bash
|
|
|
|
lotus --version
|
|
|
|
##TODO: paths can use values from lotus-env.env file
|
|
|
|
# if not already initialized
|
|
if [ ! -f /root/.lotus-local-net/config.toml ]; then
|
|
# init node config
|
|
mkdir $HOME/.lotus-local-net
|
|
lotus config default > $HOME/.lotus-local-net/config.toml
|
|
|
|
# add bootstrap peer info if available
|
|
if [ -f /root/.lotus-shared/miner.addr ]; then
|
|
MINER_ADDR=\"$(cat /root/.lotus-shared/miner.addr)\"
|
|
# add bootstrap peer id to config file
|
|
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $HOME/.lotus-local-net/config.toml
|
|
else
|
|
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
|
fi
|
|
fi
|
|
|
|
# start node
|
|
lotus daemon --genesis=/devgen.car
|