commit
40dc35a13b
@ -55,11 +55,12 @@ echo "⏳Downloading Ceremonyclient"
|
||||
sleep 2 # Add a 2-second delay
|
||||
git clone https://github.com/QuilibriumNetwork/ceremonyclient.git
|
||||
cd ~/ceremonyclient
|
||||
git checkout release
|
||||
|
||||
# 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.17 .
|
||||
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:1.4.18 .
|
||||
|
||||
# Step 8:Run Ceremonyclient Container
|
||||
echo "✅Running Ceremonyclient Container"
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ~
|
||||
|
||||
# Step 0: Welcome
|
||||
echo "This script is made with ❤️ by 0xOzgur.eth"
|
||||
echo "⏳Enjoy and sit back while you are building your Quilibrium Ceremony Client!"
|
||||
|
||||
echo "This script is made with ❤️ by 0xOzgur.eth @ 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!"
|
||||
echo "⏳Processing..."
|
||||
sleep 10 # Add a 10-second delay
|
||||
|
||||
@ -12,8 +14,11 @@ sleep 10 # Add a 10-second delay
|
||||
echo "Updating the machine"
|
||||
echo "⏳Processing..."
|
||||
sleep 2 # Add a 2-second delay
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
sudo apt install git -y
|
||||
|
||||
|
||||
# Step 2: Adjust network buffer sizes
|
||||
echo "Adjusting network buffer sizes..."
|
||||
@ -29,28 +34,82 @@ else
|
||||
fi
|
||||
sudo sysctl -p
|
||||
|
||||
# Step 3:Download Ceremonyclient
|
||||
# Step 3: Check if directory ~/ceremonyclient exists and remove it
|
||||
if [ -d ~/ceremonyclient ]; then
|
||||
# Check if backup directory ~/backup/qnode_keys exists, if not create it
|
||||
if [ ! -d ~/backup/qnode_keys ]; then
|
||||
mkdir -p ~/backup/qnode_keys
|
||||
fi
|
||||
|
||||
# Check if files exist, then backup
|
||||
if [ -f ~/ceremonyclient/node/.config/keys.yml ]; then
|
||||
cp ~/ceremonyclient/node/.config/keys.yml ~/backup/qnode_keys/
|
||||
echo "✅ Backup of keys.yml created in ~/backup/qnode_keys folder"
|
||||
fi
|
||||
|
||||
if [ -f ~/ceremonyclient/node/.config/config.yml ]; then
|
||||
cp ~/ceremonyclient/node/.config/config.yml ~/backup/qnode_keys/
|
||||
echo "✅ Backup of config.yml created in ~/backup/qnode_keys folder"
|
||||
fi
|
||||
|
||||
# Remove existing directory ~/ceremonyclient
|
||||
echo "🗑️ Removing existing directory ~/ceremonyclient..."
|
||||
rm -rf ~/ceremonyclient
|
||||
fi
|
||||
|
||||
# Step 4:Download Ceremonyclient
|
||||
echo "⏳Downloading Ceremonyclient"
|
||||
sleep 2 # Add a 2-second delay
|
||||
git clone https://github.com/QuilibriumNetwork/ceremonyclient.git
|
||||
sleep 1 # Add a 1-second delay
|
||||
cd ~
|
||||
if [ -d "ceremonyclient" ]; then
|
||||
echo "Directory ceremonyclient already exists, skipping git clone..."
|
||||
else
|
||||
until git clone https://github.com/QuilibriumNetwork/ceremonyclient.git; do
|
||||
echo "Git clone failed, retrying..."
|
||||
sleep 2
|
||||
done
|
||||
fi
|
||||
cd ~/ceremonyclient/
|
||||
git checkout release
|
||||
|
||||
cd ~/ceremonyclient/node
|
||||
# Set the version number
|
||||
VERSION="1.4.18"
|
||||
|
||||
# Step 4:Download Binary
|
||||
echo "⏳Downloading Binary"
|
||||
sleep 2 # Add a 2-second delay
|
||||
wget https://github.com/QuilibriumNetwork/ceremonyclient/releases/download/v1.4.17/node-1.4.17-linux-amd64.bin
|
||||
ls
|
||||
mv node*.bin node
|
||||
# Get the system architecture
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Step 5:Make the file executable
|
||||
echo "⏳Making the Binary executable"
|
||||
sleep 2 # Add a 2-second delay
|
||||
chmod +x node
|
||||
# Step 5:Determine the ExecStart line based on the architecture
|
||||
# Get the current user's home directory
|
||||
HOME=$(eval echo ~$HOME_DIR)
|
||||
|
||||
# Use the home directory in the path
|
||||
NODE_PATH="$HOME/ceremonyclient/node"
|
||||
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
EXEC_START="$NODE_PATH/node-$VERSION-linux-amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
EXEC_START="$NODE_PATH/node-$VERSION-linux-arm64"
|
||||
elif [ "$ARCH" = "arm64" ]; then
|
||||
EXEC_START="$NODE_PATH/node-$VERSION-darwin-arm64"
|
||||
else
|
||||
echo "Unsupported architecture: $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Step 6:Create Ceremonyclient Service
|
||||
echo "⏳Creating Ceremonyclient Service"
|
||||
echo "⏳ Re-Creating Ceremonyclient Service"
|
||||
sleep 2 # Add a 2-second delay
|
||||
|
||||
# Check if the file exists before attempting to remove it
|
||||
if [ -f "/lib/systemd/system/ceremonyclient.service" ]; then
|
||||
# If the file exists, remove it
|
||||
rm /lib/systemd/system/ceremonyclient.service
|
||||
echo "ceremonyclient.service file removed."
|
||||
else
|
||||
# If the file does not exist, inform the user
|
||||
echo "ceremonyclient.service file does not exist. No action taken."
|
||||
fi
|
||||
|
||||
sudo tee /lib/systemd/system/ceremonyclient.service > /dev/null <<EOF
|
||||
[Unit]
|
||||
Description=Ceremony Client Go App Service
|
||||
@ -60,20 +119,22 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
WorkingDirectory=/root/ceremonyclient/node
|
||||
ExecStart=/root/ceremonyclient/node/node
|
||||
ExecStart=$EXEC_START
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
# Step 7:Start the ceremonyclient service
|
||||
echo "✅Starting Ceremonyclient Service"
|
||||
sleep 2 # Add a 2-second delay
|
||||
systemctl enable ceremonyclient
|
||||
service ceremonyclient start
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable ceremonyclient
|
||||
|
||||
# See the logs of the ceremonyclient service
|
||||
# Step 7: Start the ceremonyclient service
|
||||
echo "✅Starting Ceremonyclient Service"
|
||||
sleep 1 # Add a 1-second delay
|
||||
sudo service ceremonyclient start
|
||||
|
||||
# Step 8: See the logs of the ceremonyclient service
|
||||
echo "🎉Welcome to Quilibrium Ceremonyclient"
|
||||
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
|
||||
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat
|
||||
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat
|
||||
|
||||
@ -13,7 +13,6 @@ fi
|
||||
export HISTTIMEFORMAT="%d/%m/%y %T "
|
||||
|
||||
|
||||
|
||||
alias e="exit"
|
||||
alias cm="ps -eo comm,pcpu --sort -pcpu | head -8; ps -eo comm,pmem --sort -pmem | head -8"
|
||||
alias st='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3'
|
||||
@ -23,10 +22,19 @@ alias wttr='curl wttr.in'
|
||||
neofetch
|
||||
|
||||
|
||||
alias peer-count='cd ~/ceremonyclient/node && grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerInfo | grep peerId | wc -l && cd ~'
|
||||
alias node-info='cd ~/ceremonyclient/node && GOEXPERIMENT=arenas go run ./... -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && - GOEXPERIMENT=arenas go run ./... --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && GOEXPERIMENT=arenas go run ./... -balance && cd ~'
|
||||
alias dpeer-count='cd ~/ceremonyclient/ && docker compose exec node grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerManifests | grep peerId | wc -l'
|
||||
alias dnode-info='cd ~/ceremonyclient/ && docker compose exec node node -node-info && cd ~'
|
||||
alias ddb-console='cd ~/ceremonyclient/ && - docker compose exec node node --db-console && cd ~'
|
||||
alias dbalance='cd ~/ceremonyclient/ && docker compose exec node node -balance && cd ~'
|
||||
alias dlog='cd ~/ceremonyclient/ && docker compose logs -f -n, --tail 100 && cd ~'
|
||||
alias dstart='cd ~/ceremonyclient/ && docker compose up -d && cd ~'
|
||||
alias drestart='cd ~/ceremonyclient/ && docker compose down && docker compose up -d && cd ~'
|
||||
alias dstop='cd ~/ceremonyclient/ && docker compose down && cd ~'
|
||||
|
||||
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.18-linux-amd64 -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -balance && cd ~'
|
||||
alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat'
|
||||
alias nstart='service ceremonyclient start'
|
||||
alias nrestart='service ceremonyclient restart'
|
||||
|
||||
@ -18,10 +18,10 @@ alias wttr='curl wttr.in'
|
||||
neofetch
|
||||
|
||||
|
||||
alias peer-count='cd ~/ceremonyclient/node && grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerInfo | grep peerId | wc -l && cd ~'
|
||||
alias node-info='cd ~/ceremonyclient/node && ./node -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && ./node --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && ./node -balance && cd ~'
|
||||
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 PeerManifests='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -balance && cd ~'
|
||||
alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat'
|
||||
alias nstart='service ceremonyclient start'
|
||||
alias nrestart='service ceremonyclient restart'
|
||||
|
||||
@ -18,11 +18,20 @@ alias wttr='curl wttr.in'
|
||||
neofetch
|
||||
|
||||
|
||||
alias peer-count='cd ~/ceremonyclient/ && docker compose exec node grpcurl -plaintext -max-msg-sz 5000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerInfo | grep peerId | wc -l'
|
||||
alias node-info='cd ~/ceremonyclient/ && docker compose exec node node -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/ && - docker compose exec node node --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/ && docker compose exec node node -balance && cd ~'
|
||||
alias nlog='cd ~/ceremonyclient/ && docker compose logs -f -n, --tail 100 && cd ~'
|
||||
alias nstart='cd ~/ceremonyclient/ && docker compose up -d && cd ~'
|
||||
alias nrestart='cd ~/ceremonyclient/ && docker compose down && docker compose up -d && cd ~'
|
||||
alias nstop='cd ~/ceremonyclient/ && docker compose down && cd ~'
|
||||
alias dpeer-count='cd ~/ceremonyclient/ && docker compose exec node grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerManifests | grep peerId | wc -l'
|
||||
alias dnode-info='cd ~/ceremonyclient/ && docker compose exec node node -node-info && cd ~'
|
||||
alias ddb-console='cd ~/ceremonyclient/ && - docker compose exec node node --db-console && cd ~'
|
||||
alias dbalance='cd ~/ceremonyclient/ && docker compose exec node node -balance && cd ~'
|
||||
alias dlog='cd ~/ceremonyclient/ && docker compose logs -f -n, --tail 100 && cd ~'
|
||||
alias dstart='cd ~/ceremonyclient/ && docker compose up -d && cd ~'
|
||||
alias drestart='cd ~/ceremonyclient/ && docker compose down && docker compose up -d && cd ~'
|
||||
alias dstop='cd ~/ceremonyclient/ && docker compose down && cd ~'
|
||||
|
||||
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.18-linux-amd64 -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -balance && cd ~'
|
||||
alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat'
|
||||
alias nstart='service ceremonyclient start'
|
||||
alias nrestart='service ceremonyclient restart'
|
||||
alias nstop='service ceremonyclient stop'
|
||||
@ -1,28 +0,0 @@
|
||||
# ~/.profile: executed by Bourne-compatible login shells.
|
||||
|
||||
if [ "$BASH" ]; then
|
||||
if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi
|
||||
fi
|
||||
|
||||
mesg n 2> /dev/null || true
|
||||
|
||||
|
||||
alias e="exit"
|
||||
alias cm="ps -eo comm,pcpu --sort -pcpu | head -8; ps -eo comm,pmem --sort -pmem | head -8"
|
||||
alias st='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3'
|
||||
alias myip='curl icanhazip.com'
|
||||
alias wttr='curl wttr.in'
|
||||
|
||||
neofetch
|
||||
|
||||
|
||||
alias peer-count='cd ~/ceremonyclient/node && grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerInfo | grep peerId | wc -l && cd ~'
|
||||
alias node-info='cd ~/ceremonyclient/node && GOEXPERIMENT=arenas go run ./... -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && - GOEXPERIMENT=arenas go run ./... --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && GOEXPERIMENT=arenas go run ./... -balance && cd ~'
|
||||
alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat'
|
||||
alias nstart='service ceremonyclient start'
|
||||
alias nrestart='service ceremonyclient restart'
|
||||
alias nstop='service ceremonyclient stop'
|
||||
35
update.sh
35
update.sh
@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Step 0: Welcome
|
||||
echo "This script is made with ❤️ by 0xOzgur.eth"
|
||||
echo "This script is made with ❤️ by https://quilibrium.space @ 0xOzgur.eth"
|
||||
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v1.4.18!"
|
||||
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
|
||||
echo "⏳Processing..."
|
||||
sleep 10 # Add a 10-second delay
|
||||
|
||||
@ -15,6 +16,30 @@ cd ~/ceremonyclient
|
||||
git pull
|
||||
git checkout release
|
||||
|
||||
# Set the version number
|
||||
VERSION="1.4.18"
|
||||
|
||||
# Get the system architecture
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Get the current user's home directory
|
||||
HOME=$(eval echo ~$HOME_DIR)
|
||||
|
||||
# Use the home directory in the path
|
||||
NODE_PATH="$HOME/ceremonyclient/node"
|
||||
|
||||
# Step10.1:Determine the ExecStart line based on the architecture
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
EXEC_START="$NODE_PATH/node-$VERSION-linux-amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
EXEC_START="$NODE_PATH/node-$VERSION-linux-arm64"
|
||||
elif [ "$ARCH" = "arm64" ]; then
|
||||
EXEC_START="$NODE_PATH/node-$VERSION-darwin-arm64"
|
||||
else
|
||||
echo "Unsupported architecture: $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Step 3:Re-Create Ceremonyclient Service
|
||||
echo "⏳ Re-Creating Ceremonyclient Service"
|
||||
sleep 2 # Add a 2-second delay
|
||||
@ -28,7 +53,7 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
WorkingDirectory=/root/ceremonyclient/node
|
||||
ExecStart=/root/ceremonyclient/node/node-1.4.18-linux-amd64
|
||||
ExecStart=$EXEC_START
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -37,9 +62,9 @@ EOF
|
||||
# Step 4:Start the ceremonyclient service
|
||||
echo "✅ Starting Ceremonyclient Service"
|
||||
sleep 2 # Add a 2-second delay
|
||||
systemctl daemon-reload
|
||||
systemctl enable ceremonyclient
|
||||
service ceremonyclient start
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable ceremonyclient
|
||||
sudo service ceremonyclient start
|
||||
|
||||
# See the logs of the ceremonyclient service
|
||||
echo "🎉 Welcome to Quilibrium Ceremonyclient v1.4.18"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user