-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.sh
More file actions
executable file
·40 lines (36 loc) · 923 Bytes
/
debug.sh
File metadata and controls
executable file
·40 lines (36 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
function restart(){
kill_validator
./l2 docker clean
./l2 docker genesis bootstrap
./l2 docker start geth
./prysm-debug.sh start
validator
}
function kill_validator(){
cd prysm-debug
if [ -f validator.pid ]; then
kill -9 `cat validator.pid`
rm validator.pid
fi
cd ..
}
function validator(){
kill_validator
cd prysm-debug
nohup ./validator --datadir validatordata_new --accept-terms-of-use --chain-config-file /root/eth_bootstrap/config.yml \
--wallet-password-file=wallet_password.txt --wallet-dir=/root/.eth2validators/prysm-wallet-v2 --beacon-rpc-provider=localhost:4000 \
--suggested-fee-recipient=0x7d2373b65C23727e7d6Faa68C07D974f2044020F > validator.log 2>&1 &
# save the pid
echo $! > validator.pid
cd ..
}
COMMAND=$1
shift
case $COMMAND in
restart) restart;;
new_validator) validator;;
*)
echo "Usage: $0 {restart|validator}"
exit 1
esac