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..."