保存脚本 ubutnu目录下如bevm.sh,在ubuntu下执行 sudo bash bevm.sh
#!/bin/bash
apt update
curl -L -o bevm https://github.com/btclayer2/BEVM/releases/download/testnet-v0.1.1/bevm-v0.1.1-ubuntu20.04
chmod +x /home/ubuntu/bevm
read -p "输入你的钱包地址: " name
echo "[Unit]
Description=BEVM Node Service
After=network.target
[Service]
Type=simple
User=ubuntu
ExecStart=/home/ubuntu/bevm --chain=testnet --name=\"$name\" --pruning=archive --telemetry-url \"wss://telemetry.bevm.io/submit 0\"
Restart=always
RestartSec=0
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/bevm.service
systemctl daemon-reload
systemctl start bevm.service
systemctl enable bevm.service
查看日志。sudo systemctl status bevm.service