Skip to content

Commit

Permalink
Removed array approach cause it didn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
zenodeapp committed Oct 27, 2023
1 parent 816790d commit 1427bbe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions reupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,13 @@ sed -i '212s/.*/enable = false/' app.toml
cd ~/.genesisd
rm -r data

urls=("http://135.181.135.29/data.tar.lz4" "http://168.119.138.91/data.tar.lz4")
url_count=${#urls[@]}
random_index=$((RANDOM % url_count))
chosen_url=${urls[$random_index]}
url1="http://135.181.135.29/data.tar.lz4"
url2="http://168.119.138.91/data.tar.lz4"
random_number=$((RANDOM % 2))
chosen_url=${url1}
if [ $random_number -eq 1 ]; then
chosen_url=${url2}
fi
curl -o - -L "$chosen_url" | lz4 -c -d - | tar -x -C ~/.genesisd

# STARTING genesisd AS A SERVICE
Expand Down

0 comments on commit 1427bbe

Please sign in to comment.