From 34bd27e6ed4c36f0b13ed1b9ed9c5848f26e28cc Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:26:26 +0300 Subject: [PATCH 1/4] v2.0 Updates --- README.md | 4 ++-- install/Install_prerequisites.sh | 2 +- install/install_docker.sh | 2 +- install/install_quilibrium_service.sh | 2 +- profile/.bash_profile | 8 ++++---- profile/.profile | 6 +++--- quilibrium_for_dummies.sh | 2 +- update/update.sh | 2 +- update/updateDocker.sh | 6 +++--- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 81ea82d..e407684 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ After first run, when you need to reach your node, you need to run only; **Autoinstaller Script for Quilibrium as a Service** -Use below command to install v1.4.21 +Use below command to install v2.0 wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/install_quilibrium_service.sh | bash **Autoupdater** -If you need to update your node from previous version to 1.4.21, apply below command +If you need to update your node from previous version to 2.0, apply below command wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update/update.sh | bash diff --git a/install/Install_prerequisites.sh b/install/Install_prerequisites.sh index 2d3717e..6b170d5 100644 --- a/install/Install_prerequisites.sh +++ b/install/Install_prerequisites.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the version number -VERSION="1.4.21" +VERSION="2.0" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) diff --git a/install/install_docker.sh b/install/install_docker.sh index c098179..b1684c5 100644 --- a/install/install_docker.sh +++ b/install/install_docker.sh @@ -60,7 +60,7 @@ git checkout release-cdn # Step 7:Build Docker Container echo "⏳Building Ceremonyclient Container" sleep 2 # Add a 2-second delay -docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:1.4.21 .1.4.21 +docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:2.0 .2.0 # Step 8:Run Ceremonyclient Container echo "✅Running Ceremonyclient Container" diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index 8964d59..3c31bee 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -1,6 +1,6 @@ #!/bin/bash # Set the version number -VERSION="1.4.21" +VERSION="2.0" cd ~ # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space " diff --git a/profile/.bash_profile b/profile/.bash_profile index d6faacb..d6ef9ea 100644 --- a/profile/.bash_profile +++ b/profile/.bash_profile @@ -28,15 +28,15 @@ OS=$(uname -s) # Determine the node binary name based on the architecture and OS if [ "$ARCH" = "x86_64" ]; then if [ "$OS" = "Linux" ]; then - NODE_BINARY='node-1.4.21-linux-amd64' + NODE_BINARY='node-2.0-linux-amd64' elif [ "$OS" = "Darwin" ]; then - NODE_BINARY='node-1.4.21-darwin-amd64' + NODE_BINARY='node-2.0-darwin-amd64' fi elif [ "$ARCH" = "aarch64" ]; then if [ "$OS" = "Linux" ]; then - NODE_BINARY='node-1.4.21-linux-arm64' + NODE_BINARY='node-2.0-linux-arm64' elif [ "$OS" = "Darwin" ]; then - NODE_BINARY='node-1.4.21-darwin-arm64' + NODE_BINARY='node-2.0-darwin-arm64' fi fi diff --git a/profile/.profile b/profile/.profile index f24737b..390e918 100644 --- a/profile/.profile +++ b/profile/.profile @@ -28,9 +28,9 @@ alias drestart='cd ~/ceremonyclient/ && docker compose down && docker compose up alias dstop='cd ~/ceremonyclient/ && docker compose down && cd ~' # Shortcuts for Service alias peer-count="cd ~/ceremonyclient/node && grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerManifests | grep peerId | wc -l && cd ~" -alias node-info="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 -node-info && cd ~" -alias db-console="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 --db-console && cd ~" -alias balance="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 -balance && cd ~" +alias node-info="cd ~/ceremonyclient/node && ./node-2.0-linux-amd64 -node-info && cd ~" +alias db-console="cd ~/ceremonyclient/node && ./node-2.0-linux-amd64 --db-console && cd ~" +alias balance="cd ~/ceremonyclient/node && ./node-2.0-linux-amd64 -balance && cd ~" alias nlog="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat" alias increment="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat | grep time_taken" alias nstart="service ceremonyclient start" diff --git a/quilibrium_for_dummies.sh b/quilibrium_for_dummies.sh index f9dceb3..1794d0b 100644 --- a/quilibrium_for_dummies.sh +++ b/quilibrium_for_dummies.sh @@ -6,7 +6,7 @@ source ~/.bashrc clear # Set the version number -VERSION="1.4.21" +VERSION="2.0" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) diff --git a/update/update.sh b/update/update.sh index 634a24e..3b2ce32 100644 --- a/update/update.sh +++ b/update/update.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="1.4.21" +VERSION="2.0" # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space" echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v$VERSION!" diff --git a/update/updateDocker.sh b/update/updateDocker.sh index eed81f8..81e24a5 100644 --- a/update/updateDocker.sh +++ b/update/updateDocker.sh @@ -2,7 +2,7 @@ # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur.eth" -echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v1.4.21!" +echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v2.0!" echo "⏳Processing..." sleep 10 # Add a 10-second delay @@ -10,7 +10,7 @@ sleep 10 # Add a 10-second delay service ceremonyclient stop # Step 1:Download Binary -echo "⏳ Downloading New Release v1.4.21" +echo "⏳ Downloading New Release v2.0" cd ~/ceremonyclient git pull git checkout release-cdn @@ -18,7 +18,7 @@ git checkout release-cdn # Step 7:Build Docker Container echo "⏳Building Ceremonyclient Container" sleep 2 # Add a 2-second delay -docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:1.4.21 . +docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:2.0 . # Step 8:Run Ceremonyclient Container echo "✅Running Ceremonyclient Container" From 3b64d6b3b96a239911d6dbbdeded69bf5ecdaed9 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:39:04 +0300 Subject: [PATCH 2/4] service update SIGINT --- install/install.sh | 2 ++ install/install_quilibrium_service.sh | 2 ++ update/update.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/install/install.sh b/install/install.sh index 743f75e..8616a88 100644 --- a/install/install.sh +++ b/install/install.sh @@ -158,6 +158,8 @@ Restart=always RestartSec=5s WorkingDirectory=$NODE_PATH ExecStart=$EXEC_START +KillSignal=SIGINT +TimeoutStopSec=30s [Install] WantedBy=multi-user.target diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index 3c31bee..f7d4c48 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -160,6 +160,8 @@ Restart=always RestartSec=5s WorkingDirectory=$NODE_PATH ExecStart=$EXEC_START +KillSignal=SIGINT +TimeoutStopSec=30s [Install] WantedBy=multi-user.target diff --git a/update/update.sh b/update/update.sh index 3b2ce32..d268ff0 100644 --- a/update/update.sh +++ b/update/update.sh @@ -81,6 +81,8 @@ Restart=always RestartSec=5s WorkingDirectory=$NODE_PATH ExecStart=$EXEC_START +KillSignal=SIGINT +TimeoutStopSec=30s [Install] WantedBy=multi-user.target From e5045d14f82433916cf9beb2deab17a19bb99e70 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Sat, 12 Oct 2024 22:55:59 +0300 Subject: [PATCH 3/4] v2.0.0 update --- configuration/config.sh | 2 +- configuration/config_docker.sh | 2 +- install/Install_prerequisites.sh | 58 +++++++++++++++++++++++---- install/install.sh | 2 +- install/install_docker.sh | 2 +- install/install_quilibrium_service.sh | 13 +----- quilibrium_for_dummies.sh | 4 +- update/update.sh | 54 +++++++++++++++++++------ update/updateDocker.sh | 2 +- visibility_check.sh | 2 +- 10 files changed, 103 insertions(+), 38 deletions(-) diff --git a/configuration/config.sh b/configuration/config.sh index f5981c5..d43f8dc 100644 --- a/configuration/config.sh +++ b/configuration/config.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 0: Welcome -echo "This script is prepared by 0xOzgur.eth" +echo "This script is prepared by 0xOzgur" echo "Enjoy and sit back while you are configuring grpCurl for Quilibrium Ceremony Client!" echo "Processing..." sleep 10 # Add a 10-second delay diff --git a/configuration/config_docker.sh b/configuration/config_docker.sh index 90a3c11..fdb3e6c 100644 --- a/configuration/config_docker.sh +++ b/configuration/config_docker.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 0: Welcome -echo "This script is prepared by 0xOzgur.eth" +echo "This script is prepared by 0xOzgur" echo "Enjoy and sit back while you are configuring grpCurl for Quilibrium Ceremony Client!" echo "Processing..." sleep 10 # Add a 10-second delay diff --git a/install/Install_prerequisites.sh b/install/Install_prerequisites.sh index 6b170d5..9de964f 100644 --- a/install/Install_prerequisites.sh +++ b/install/Install_prerequisites.sh @@ -1,29 +1,73 @@ #!/bin/bash # Set the version number -VERSION="2.0" +VERSION="2.0.0" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) OS=$(uname -s) +# Determine the node binary name based on the architecture and OS +# Check if NODE_VERSION is empty +if [ -z "$NODE_VERSION" ]; then + NODE_VERSION=$(curl -s https://releases.quilibrium.com/release | grep -E "^node-[0-9]+(\.[0-9]+)*" | grep -v "dgst" | sed 's/^node-//' | cut -d '-' -f 1 | head -n 1) + if [ -z "$NODE_VERSION" ]; then + echo "❌ Error: Unable to determine NODE_VERSION automatically." + echo "The script cannot proceed without a correct node version number." + echo "Please try the manual step by step installation instead:" + echo "https://docs.quilibrium.one/start/tutorials/node-step-by-step-installation" + echo + exit 1 + else + echo "✅ Automatically determined NODE_VERSION: $NODE_VERSION" + fi +else + echo "✅ Using specified NODE_VERSION: $NODE_VERSION" +fi + +# Determine qclient latest version +# Check if QCLIENT_VERSION is empty +if [ -z "$QCLIENT_VERSION" ]; then + QCLIENT_VERSION=$(curl -s https://releases.quilibrium.com/qclient-release | grep -E "^qclient-[0-9]+(\.[0-9]+)*" | sed 's/^qclient-//' | cut -d '-' -f 1 | head -n 1) + if [ -z "$QCLIENT_VERSION" ]; then + echo "⚠️ Warning: Unable to determine QCLIENT_VERSION automatically. Continuing without it." + echo "The script won't be able to install the qclient, but it will still install your node." + echo "You can install the qclient later manually if you need to." + echo + sleep 1 + else + echo "✅ Automatically determined QCLIENT_VERSION: $QCLIENT_VERSION" + fi +else + echo "✅ Using specified QCLIENT_VERSION: $QCLIENT_VERSION" +fi + +echo + # Determine the node binary name based on the architecture and OS if [ "$ARCH" = "x86_64" ]; then if [ "$OS" = "Linux" ]; then - NODE_BINARY="node-$VERSION-linux-amd64" + NODE_BINARY="node-$NODE_VERSION-linux-amd64" GO_BINARY="go1.22.4.linux-amd64.tar.gz" + [ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-linux-amd64" elif [ "$OS" = "Darwin" ]; then - NODE_BINARY="node-$VERSION-darwin-amd64" - GO_BINARY="go1.22.44.linux-amd64.tar.gz" + NODE_BINARY="node-$NODE_VERSION-darwin-amd64" + GO_BINARY="go1.22.4.darwin-amd64.tar.gz" + [ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-darwin-amd64" fi elif [ "$ARCH" = "aarch64" ]; then if [ "$OS" = "Linux" ]; then - NODE_BINARY="node-$VERSION-linux-arm64" + NODE_BINARY="node-$NODE_VERSION-linux-arm64" GO_BINARY="go1.22.4.linux-arm64.tar.gz" + [ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-linux-arm64" elif [ "$OS" = "Darwin" ]; then - NODE_BINARY="node-$VERSION-darwin-arm64" - GO_BINARY="go1.22.4.linux-arm64.tar.gz" + NODE_BINARY="node-$NODE_VERSION-darwin-arm64" + GO_BINARY="go1.22.4.darwin-arm64.tar.gz" + [ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-darwin-arm64" fi +else + echo "❌ Error: Unsupported system architecture ($ARCH) or operating system ($OS)." + exit 1 fi echo "Installing prerequisites..." diff --git a/install/install.sh b/install/install.sh index 8616a88..b30a110 100644 --- a/install/install.sh +++ b/install/install.sh @@ -3,7 +3,7 @@ cd ~ # Step 0: Welcome -echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space " +echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space " echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script." echo "The script doesn't install GO or GrpCurl packages. If you want to install them please visit https://docs.quilibrium.space/installing-prerequisites page." echo "⏳Enjoy and sit back while you are building your Quilibrium Node!" diff --git a/install/install_docker.sh b/install/install_docker.sh index b1684c5..0074fa9 100644 --- a/install/install_docker.sh +++ b/install/install_docker.sh @@ -3,7 +3,7 @@ cd ~ # Step 0: Welcome -echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space" +echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space" echo "⏳Enjoy and sit back while you are building your Quilibrium Ceremony Client!" echo "⏳Processing..." sleep 10 # Add a 10-second delay diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index f7d4c48..77b6cfb 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -1,9 +1,9 @@ #!/bin/bash # Set the version number -VERSION="2.0" +VERSION="2.0.0" cd ~ # Step 0: Welcome -echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space " +echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space " echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script." echo "The script doesn't install GO or GrpCurl packages. If you want to install them please visit https://docs.quilibrium.space/installing-prerequisites page." echo "⏳Enjoy and sit back while you are building your Quilibrium Node!" @@ -34,15 +34,6 @@ else echo "git is installed" fi -# if ! command -v cpulimit &> /dev/null -# then -# echo "cpulimit could not be found" -# echo "Installing cpulimit..." -# su -c "apt update && apt install cpulimit -y" -# else -# echo "cpulimit is installed" -# fi - sudo apt upgrade -y # Step 2: Adjust network buffer sizes diff --git a/quilibrium_for_dummies.sh b/quilibrium_for_dummies.sh index 1794d0b..17f0a52 100644 --- a/quilibrium_for_dummies.sh +++ b/quilibrium_for_dummies.sh @@ -6,7 +6,7 @@ source ~/.bashrc clear # Set the version number -VERSION="2.0" +VERSION="2.0.0" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) @@ -102,7 +102,7 @@ while true; do clear echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space" echo "Welcome to Quilibrium for Dummies!" - + 0xOzgur echo " _____ _ _ _ _ _ / ___ \ (_) (_) | (_) diff --git a/update/update.sh b/update/update.sh index d268ff0..2fbd825 100644 --- a/update/update.sh +++ b/update/update.sh @@ -1,7 +1,9 @@ #!/bin/bash -VERSION="2.0" + +VERSION="2.0.0" + # Step 0: Welcome -echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space" +echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space" echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v$VERSION!" echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script." echo "⏳Processing..." @@ -10,6 +12,20 @@ sleep 5 # Add a 5-second delay # Stop the ceremonyclient service echo "Updating node..." service ceremonyclient stop + echo "⏳ Stopping the ceremonyclient service if it exists..." +if systemctl is-active --quiet ceremonyclient; then + if sudo systemctl stop ceremonyclient; then + echo "🔴 Service stopped successfully." + echo + else + echo "❌ Failed to stop the ceremonyclient service." >&2 + echo + fi +else + echo "ℹ️ Ceremonyclient service is not active or does not exist." + echo +fi +sleep 1 # apt install cpulimit -y # apt install gawk -y #incase it is not installed @@ -22,6 +38,8 @@ git checkout main git branch -D release git pull git checkout release +echo "✅ Downloaded the latest changes successfully." +echo # Determine the ExecStart line based on the architecture ARCH=$(uname -m) @@ -50,20 +68,32 @@ elif [ "$ARCH" = "aarch64" ]; then fi # Step 4:Update qClient -echo "Updating qClient" -sleep 1 # Add a 1-second delay -cd ~/ceremonyclient/client -rm -f qclient -wget https://releases.quilibrium.com/$QCLIENT_BINARY -mv $QCLIENT_BINARY qclient -chmod +x qclient +if [ -n "$QCLIENT_BINARY" ]; then + echo "⏳ Updating qClient..." + sleep 1 # Add a 1-second delay + cd ~/ceremonyclient/client + + if ! wget https://releases.quilibrium.com/$QCLIENT_BINARY; then + echo "❌ Error: Failed to download qClient binary." + echo "Your node will still work, but you'll need to install the qclient manually later if needed." + else + mv $QCLIENT_BINARY qclient + chmod +x qclient + echo "✅ qClient binary downloaded successfully." + fi +else + echo "ℹ️ Skipping qClient download as QCLIENT_BINARY could not be determined earlier." + echo "Your node will still work, but you'll need to install the qclient manually later if needed." +fi + +echo # Get the current user's home directory HOME=$(eval echo ~$HOME_DIR) # Use the home directory in the path NODE_PATH="$HOME/ceremonyclient/node" -EXEC_START="$NODE_PATH/release_autorun.sh" +EXEC_START="$NODE_PATH/$NODE_BINARY" # Re-Create Ceremonyclient Service echo "⏳ Re-Creating Ceremonyclient Service" @@ -109,10 +139,10 @@ echo "✅ Starting Ceremonyclient Service" sleep 2 # Add a 2-second delay sudo systemctl daemon-reload sudo systemctl enable ceremonyclient -sudo service ceremonyclient start +sudo systemctl start ceremonyclient # See the logs of the ceremonyclient service echo "🎉 Welcome to Quilibrium Ceremonyclient v$VERSION" echo "⏳ Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs." -sleep 5 # Add a 5-second delay +sleep 2 # Add a 2-second delay sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat diff --git a/update/updateDocker.sh b/update/updateDocker.sh index 81e24a5..0bf5b2a 100644 --- a/update/updateDocker.sh +++ b/update/updateDocker.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 0: Welcome -echo "This script is made with ❤️ by 0xOzgur.eth" +echo "This script is made with ❤️ by 0xOzgur" echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v2.0!" echo "⏳Processing..." sleep 10 # Add a 10-second delay diff --git a/visibility_check.sh b/visibility_check.sh index 3a9dd43..9f4d50a 100644 --- a/visibility_check.sh +++ b/visibility_check.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 0: Welcome -echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space" +echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space" echo "⏳You need GO and grpcurl installed and configured on your machine to run this script. If you don't have them, please install and configure grpcurl first." echo "You can find the installation instructions at https://docs.quilibrium.space/installing-prerequisites" echo "⏳Processing..." From 67d41bfcb620b20d9c05a48a2c4fee08accd5f15 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:44:12 +0300 Subject: [PATCH 4/4] v2.0.0.1 --- install/Install_prerequisites.sh | 2 +- install/install_quilibrium_service.sh | 69 ++++++++++++++++++++++--- quilibrium_for_dummies.sh | 2 +- update/update.sh | 73 ++++++++++++++++++++------- 4 files changed, 119 insertions(+), 27 deletions(-) diff --git a/install/Install_prerequisites.sh b/install/Install_prerequisites.sh index 9de964f..8a74522 100644 --- a/install/Install_prerequisites.sh +++ b/install/Install_prerequisites.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the version number -VERSION="2.0.0" +VERSION="2.0.0.1" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index 77b6cfb..c303732 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -1,6 +1,6 @@ #!/bin/bash # Set the version number -VERSION="2.0.0" +VERSION="2.0.0.1" cd ~ # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space " @@ -85,6 +85,33 @@ cd ~/ceremonyclient/ # git remote set-url origin https://github.com/QuilibriumNetwork/ceremonyclient.git || git remote set-url origin https://source.quilibrium.com/quilibrium/ceremonyclient.git git checkout release +# Get the current OS and architecture +OS_ARCH=$(get_os_arch) + +# Fetch the list of files from the release page +FILES=$(curl -s $BASE_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?") + + +# Change to the download directory +cd ~/ceremonyclient/node + +# Download each file +for file in $FILES; do + echo "Downloading $file..." + wget "https://releases.quilibrium.com/$file" + + # Check if the download was successful + if [ $? -eq 0 ]; then + echo "Successfully downloaded $file" + else + echo "Failed to download $file" + fi + + echo "------------------------" +done + + + # Determine the ExecStart line based on the architecture ARCH=$(uname -m) OS=$(uname -s) @@ -94,11 +121,11 @@ if [ "$ARCH" = "x86_64" ]; then if [ "$OS" = "Linux" ]; then NODE_BINARY="node-$VERSION-linux-amd64" GO_BINARY="go1.22.4.linux-amd64.tar.gz" - QCLIENT_BINARY="qclient-1.4.19.1-linux-amd64" + QCLIENT_BINARY="qclient-2.0.0-linux-amd64" elif [ "$OS" = "Darwin" ]; then NODE_BINARY="node-$VERSION-darwin-amd64" GO_BINARY="go1.22.44.linux-amd64.tar.gz" - QCLIENT_BINARY="qclient-1.4.19.1-darwin-arm64" + QCLIENT_BINARY="qclient-2.0.0-darwin-arm64" fi elif [ "$ARCH" = "aarch64" ]; then if [ "$OS" = "Linux" ]; then @@ -107,17 +134,43 @@ elif [ "$ARCH" = "aarch64" ]; then elif [ "$OS" = "Darwin" ]; then NODE_BINARY="node-$VERSION-darwin-arm64" GO_BINARY="go1.22.4.linux-arm64.tar.gz" - QCLIENT_BINARY="qclient-1.4.19.1-linux-arm64" + QCLIENT_BINARY="qclient-2.0.0-linux-arm64" fi fi # Step 4:Download qClient echo "⏳Downloading qClient" sleep 1 # Add a 1-second delay +# Get the current OS and architecture +OS_ARCH=$(get_os_arch) + +# Fetch the list of files from the release page +FILES=$(curl -s $BASE_URL | grep -oE "qclient-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?") + +# Change to the download directory cd ~/ceremonyclient/client -wget https://releases.quilibrium.com/$QCLIENT_BINARY -mv $QCLIENT_BINARY qclient -chmod +x qclient + +# Download each file +for file in $FILES; do + echo "Downloading $file..." + wget "https://releases.quilibrium.com/$file" + + # Check if the download was successful + if [ $? -eq 0 ]; then + echo "Successfully downloaded $file" + else + echo "❌ Error: Failed to download $file" + echo "Your node will still work, but you'll need to install the qclient manually later if needed." + fi + + echo "------------------------" +done + + mv $QCLIENT_BINARY qclient + chmod +x qclient + echo "✅ qClient binary downloaded and configured successfully." + +echo # Step 5:Determine the ExecStart line based on the architecture # Get the current user's home directory @@ -125,7 +178,7 @@ HOME=$(eval echo ~$HOME_DIR) # Use the home directory in the path NODE_PATH="$HOME/ceremonyclient/node" -EXEC_START="$NODE_PATH/release_autorun.sh" +EXEC_START="$NODE_PATH/$NODE_BINARY" # Step 6:Create Ceremonyclient Service echo "⏳ Creating Ceremonyclient Service" diff --git a/quilibrium_for_dummies.sh b/quilibrium_for_dummies.sh index 17f0a52..6b91faa 100644 --- a/quilibrium_for_dummies.sh +++ b/quilibrium_for_dummies.sh @@ -6,7 +6,7 @@ source ~/.bashrc clear # Set the version number -VERSION="2.0.0" +VERSION="2.0.0.1" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) diff --git a/update/update.sh b/update/update.sh index 2fbd825..77626b4 100644 --- a/update/update.sh +++ b/update/update.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION="2.0.0" +VERSION="2.0.0.1" # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space" @@ -41,6 +41,33 @@ git checkout release echo "✅ Downloaded the latest changes successfully." echo +# Get the current OS and architecture +OS_ARCH=$(get_os_arch) + +# Fetch the list of files from the release page +FILES=$(curl -s $BASE_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?") + + +# Change to the download directory +cd ~/ceremonyclient/node + +# Download each file +for file in $FILES; do + echo "Downloading $file..." + wget "https://releases.quilibrium.com/$file" + + # Check if the download was successful + if [ $? -eq 0 ]; then + echo "Successfully downloaded $file" + else + echo "Failed to download $file" + fi + + echo "------------------------" +done + + + # Determine the ExecStart line based on the architecture ARCH=$(uname -m) OS=$(uname -s) @@ -50,11 +77,11 @@ if [ "$ARCH" = "x86_64" ]; then if [ "$OS" = "Linux" ]; then NODE_BINARY="node-$VERSION-linux-amd64" GO_BINARY="go1.22.4.linux-amd64.tar.gz" - QCLIENT_BINARY="qclient-1.4.19.1-linux-amd64" + QCLIENT_BINARY="qclient-2.0.0-linux-amd64" elif [ "$OS" = "Darwin" ]; then NODE_BINARY="node-$VERSION-darwin-amd64" GO_BINARY="go1.22.44.linux-amd64.tar.gz" - QCLIENT_BINARY="qclient-1.4.19.1-darwin-arm64" + QCLIENT_BINARY="qclient-2.0.0-darwin-arm64" fi elif [ "$ARCH" = "aarch64" ]; then if [ "$OS" = "Linux" ]; then @@ -63,28 +90,40 @@ elif [ "$ARCH" = "aarch64" ]; then elif [ "$OS" = "Darwin" ]; then NODE_BINARY="node-$VERSION-darwin-arm64" GO_BINARY="go1.22.4.linux-arm64.tar.gz" - QCLIENT_BINARY="qclient-1.4.19.1-linux-arm64" + QCLIENT_BINARY="qclient-2.0.0-linux-arm64" fi fi # Step 4:Update qClient -if [ -n "$QCLIENT_BINARY" ]; then - echo "⏳ Updating qClient..." - sleep 1 # Add a 1-second delay - cd ~/ceremonyclient/client - if ! wget https://releases.quilibrium.com/$QCLIENT_BINARY; then - echo "❌ Error: Failed to download qClient binary." - echo "Your node will still work, but you'll need to install the qclient manually later if needed." +# Get the current OS and architecture +OS_ARCH=$(get_os_arch) + +# Fetch the list of files from the release page +FILES=$(curl -s $BASE_URL | grep -oE "qclient-[0-9]+\.[0-9]+\.[0-9]+-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?") + +# Change to the download directory +cd ~/ceremonyclient/client + +# Download each file +for file in $FILES; do + echo "Downloading $file..." + wget "https://releases.quilibrium.com/$file" + + # Check if the download was successful + if [ $? -eq 0 ]; then + echo "Successfully downloaded $file" else + echo "❌ Error: Failed to download $file" + echo "Your node will still work, but you'll need to install the qclient manually later if needed." + fi + + echo "------------------------" +done + mv $QCLIENT_BINARY qclient chmod +x qclient - echo "✅ qClient binary downloaded successfully." - fi -else - echo "ℹ️ Skipping qClient download as QCLIENT_BINARY could not be determined earlier." - echo "Your node will still work, but you'll need to install the qclient manually later if needed." -fi + echo "✅ qClient binary downloaded and configured successfully." echo