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] 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