lotus/scripts/deploy-miner.sh

19 lines
500 B
Bash
Raw Normal View History

2019-10-13 07:33:25 +00:00
#!/usr/bin/env bash
HOST=$1
2020-07-08 10:53:04 +00:00
ssh "$HOST" '[ -e ~/.lotusminer/token ]' && exit 0
2019-10-17 00:43:38 +00:00
2019-10-13 07:33:25 +00:00
ssh "$HOST" 'lotus wallet new bls > addr'
ssh "$HOST" 'curl http://147.75.80.29:777/sendcoll?address=$(cat addr)' &
ssh "$HOST" 'curl http://147.75.80.29:777/sendcoll?address=$(cat addr)' &
ssh "$HOST" 'curl http://147.75.80.29:777/send?address=$(cat addr)' &
wait
echo "SYNC WAIT"
sleep 30
2019-10-13 07:33:25 +00:00
ssh "$HOST" 'lotus sync wait'
2020-07-08 10:38:59 +00:00
ssh "$HOST" 'lotus-miner init --owner=$(cat addr)'
ssh "$HOST" 'systemctl start lotus-miner' &