.profile & .bash_profile nondependency of systems
This commit is contained in:
parent
d41ee72b83
commit
93b7d0396d
@ -1,4 +1,4 @@
|
||||
# QuilibriumAutoInstaller
|
||||
# Quilibrium Tools
|
||||
Autoinstaller Script for Quilibrium as a Service
|
||||
|
||||
Use below command to install v1.4.18
|
||||
@ -9,3 +9,5 @@ Use below command to install v1.4.18
|
||||
If you need to upgrade your node from previous version to 1.4.18, apply below command
|
||||
|
||||
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update.sh | bash
|
||||
|
||||
For easy management of your nodes I created some shortcodes. You can import .profile or .bash_profile (Some Debian installations) file and source. Then you can easily query node related infos.
|
||||
@ -12,7 +12,7 @@ fi
|
||||
|
||||
export HISTTIMEFORMAT="%d/%m/%y %T "
|
||||
|
||||
|
||||
# Shortcuts for General Management
|
||||
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'
|
||||
@ -21,7 +21,27 @@ alias wttr='curl wttr.in'
|
||||
|
||||
neofetch
|
||||
|
||||
# Get system information
|
||||
ARCH=$(uname -m)
|
||||
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.18-linux-amd64'
|
||||
elif [ "$OS" = "Darwin" ]; then
|
||||
NODE_BINARY='node-1.4.18-darwin-amd64'
|
||||
fi
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
if [ "$OS" = "Linux" ]; then
|
||||
NODE_BINARY='node-1.4.18-linux-arm64'
|
||||
elif [ "$OS" = "Darwin" ]; then
|
||||
NODE_BINARY='node-1.4.18-darwin-arm64'
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Shortcuts for Docker
|
||||
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 ~'
|
||||
@ -30,11 +50,11 @@ 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 ~'
|
||||
|
||||
# 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.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 node-info='cd ~/ceremonyclient/node && ./${NODE_BINARY} -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && ./${NODE_BINARY} --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && ./${NODE_BINARY} -balance && cd ~'
|
||||
alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat'
|
||||
alias nstart='service ceremonyclient start'
|
||||
alias nrestart='service ceremonyclient restart'
|
||||
|
||||
@ -8,7 +8,7 @@ fi
|
||||
|
||||
mesg n 2> /dev/null || true
|
||||
|
||||
|
||||
# Shortcuts for General Management
|
||||
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'
|
||||
@ -17,7 +17,27 @@ alias wttr='curl wttr.in'
|
||||
|
||||
neofetch
|
||||
|
||||
# Get system information
|
||||
ARCH=$(uname -m)
|
||||
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.18-linux-amd64'
|
||||
elif [ "$OS" = "Darwin" ]; then
|
||||
NODE_BINARY='node-1.4.18-darwin-amd64'
|
||||
fi
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
if [ "$OS" = "Linux" ]; then
|
||||
NODE_BINARY='node-1.4.18-linux-arm64'
|
||||
elif [ "$OS" = "Darwin" ]; then
|
||||
NODE_BINARY='node-1.4.18-darwin-arm64'
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Shortcuts for Docker
|
||||
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 ~'
|
||||
@ -26,13 +46,12 @@ 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 ~'
|
||||
|
||||
# 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.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 node-info='cd ~/ceremonyclient/node && ./${NODE_BINARY} -node-info && cd ~'
|
||||
alias db-console='cd ~/ceremonyclient/node && ./${NODE_BINARY} --db-console && cd ~'
|
||||
alias balance='cd ~/ceremonyclient/node && ./${NODE_BINARY} -balance && cd ~'
|
||||
alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat'
|
||||
alias pid='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -peer-id && cd ~'
|
||||
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.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'
|
||||
Loading…
Reference in New Issue
Block a user