mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
fixed static-nodes related buf (os independent) (#598)
* fixed static-nodes related buf (os independent) * taking static-nodes as input if default not present
This commit is contained in:
parent
137fb19d2a
commit
d69cb20ba9
2 changed files with 14 additions and 1 deletions
|
|
@ -375,7 +375,7 @@ func getStaticTrustedNodes(args []string) {
|
|||
fmt.Println("only TOML config file is supported through CLI")
|
||||
}
|
||||
} else {
|
||||
path := "~/.bor/data/bor/static-nodes.json"
|
||||
path := "./static-nodes.json"
|
||||
if !checkFileExists(path) {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,14 @@ then
|
|||
fi
|
||||
read -p "* Your validator address (e.g. 0xca67a8D767e45056DC92384b488E9Af654d78DE2), or press Enter to skip if running a sentry node: " ADD
|
||||
|
||||
if [[ -f $HOME/.bor/data/bor/static-nodes.json ]]
|
||||
then
|
||||
cp $HOME/.bor/data/bor/static-nodes.json ./static-nodes.json
|
||||
else
|
||||
read -p "* You dont have '~/.bor/data/bor/static-nodes.json' file. If you want to use static nodes, enter the path to 'static-nodes.json' here (press Enter to skip): " STAT
|
||||
if [[ -f $STAT ]]; then cp $STAT ./static-nodes.json; fi
|
||||
fi
|
||||
|
||||
printf "\nThank you, your inputs are:\n"
|
||||
echo "Path to start.sh: "$startPath
|
||||
echo "Address: "$ADD
|
||||
|
|
@ -113,4 +121,9 @@ chmod +x $tmpDir/3305fe263dd4a999d58f96deb064e21bb70123d9.sh
|
|||
$tmpDir/3305fe263dd4a999d58f96deb064e21bb70123d9.sh $ADD
|
||||
rm $tmpDir/3305fe263dd4a999d58f96deb064e21bb70123d9.sh
|
||||
|
||||
if [[ -f $HOME/.bor/data/bor/static-nodes.json ]]
|
||||
then
|
||||
rm ./static-nodes.json
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue