soneium/install.sh

55 lines
2.3 KiB
Bash
Raw Permalink Normal View History

2024-12-17 18:44:47 +03:00
#curl -sL https://gitea.vvzvlad.xyz/vvzvlad/soneium/raw/branch/main/install.sh | sh -
apt-get update
apt-get install apt-transport-https prometheus-node-exporter ca-certificates traceroute systemd-sysv iptables gnupg-agent checkinstall software-properties-common sudo nano curl git locales-all progress tree procps curl wget telnet jq zip gzip tar htop -y
apt-get -y autoremove
apt-get -y clean
apt-get -y autoclean
2024-12-19 21:32:36 +03:00
if [ ! -f "/etc/bash.bashrc.soneium" ]; then
localectl set-locale LANG=C.UTF-8
echo "export HISTTIMEFORMAT='%F, %T '" >> /etc/bash.bashrc
echo "export HISTSIZE=10000" >> /etc/bash.bashrc
echo "export HISTFILESIZE=10000" >> /etc/bash.bashrc
echo "shopt -s histappend" >> /etc/bash.bashrc
echo "export PROMPT_COMMAND='history -a'" >> /etc/bash.bashrc
echo "export HISTCONTROL=ignoredups" >> /etc/bash.bashrc
echo "export LANG=C.UTF-8" >> /etc/bash.bashrc
echo "export LC_ALL=C.UTF-8" >> /etc/bash.bashrc
echo "alias ls='ls --color=auto'" >> /etc/bash.bashrc
echo "shopt -s cmdhist" >> /etc/bash.bashrc
echo $'"\e[A": history-search-backward' >> ~/.inputrc
echo $'"\e[B": history-search-forward' >> ~/.inputrc
echo "set nohelp" >> ~/.nanorc
echo "set tabsize 4" >> ~/.nanorc
echo "set tabstospaces" >> ~/.nanorc
echo "set autoindent" >> ~/.nanorc
echo "set positionlog" >> ~/.nanorc
echo "set backup" >> ~/.nanorc
echo "set backupdir /tmp/" >> ~/.nanorc
echo "set locking" >> ~/.nanorc
echo "include /usr/share/nano/*.nanorc" >> ~/.nanorc
touch /etc/bash.bashrc.soneium
curl -sL https://get.docker.com | sudo sh -
fi
cd /root
2024-12-19 21:29:56 +03:00
rm -rf /root/node
2024-12-19 21:20:46 +03:00
mkdir /root/node
cd /root/node
2024-12-17 18:44:47 +03:00
docker compose down --volumes --remove-orphans
2024-12-18 02:19:50 +03:00
docker system prune --all --force
2024-12-18 01:16:36 +03:00
openssl rand -hex 32 > jwt.txt
2024-12-17 18:44:47 +03:00
wget "https://gitea.vvzvlad.xyz/vvzvlad/soneium/raw/branch/main/minato-rollup.json" -O minato-rollup.json
wget "https://gitea.vvzvlad.xyz/vvzvlad/soneium/raw/branch/main/minato-genesis.json" -O minato-genesis.json
wget "https://gitea.vvzvlad.xyz/vvzvlad/soneium/raw/branch/main/docker-compose.yml" -O docker-compose.yml
2024-12-18 01:16:36 +03:00
SERVER_IP=$(curl -4 -s ifconfig.me)
sed -i "s/###IP###/${SERVER_IP}/g" docker-compose.yml
2024-12-17 18:44:47 +03:00
docker compose up -d
2024-12-24 02:52:54 +03:00
curl -s http://localhost:6060/debug/metrics/prometheus |grep -E "chain_head_header|chain_head_block" |grep -v "#"