From 1427bbe36128db0bd91a88a3b5585c4c6987d46b Mon Sep 17 00:00:00 2001 From: zenodeapp Date: Fri, 27 Oct 2023 22:53:12 +0200 Subject: [PATCH] Removed array approach cause it didn't work --- reupdate.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reupdate.sh b/reupdate.sh index f13a03f3bd..4743566680 100644 --- a/reupdate.sh +++ b/reupdate.sh @@ -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