soneium/install.sh

55 lines
2.3 KiB
Bash

#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
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
rm -rf /root/node
mkdir /root/node
cd /root/node
docker compose down --volumes --remove-orphans
docker system prune --all --force
openssl rand -hex 32 > jwt.txt
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
SERVER_IP=$(curl -4 -s ifconfig.me)
sed -i "s/###IP###/${SERVER_IP}/g" docker-compose.yml
docker compose up -d
docker compose logs -f | grep -E "Syncing beacon headers|Syncing: state download in progress|Syncing: chain download in progress"