diff --git a/scripts/deploy-miner.sh b/scripts/deploy-miner.sh index 6b6429d5c..984f3d9b3 100755 --- a/scripts/deploy-miner.sh +++ b/scripts/deploy-miner.sh @@ -2,24 +2,6 @@ HOST=$1 -# upload binaries -# TODO: destroy - -ssh "$HOST" 'systemctl stop lotus-storage-miner' -ssh "$HOST" 'systemctl stop lotus-daemon' - -ssh "$HOST" 'mkdir -p .lotus .lotusstorage' & -scp "./lotus" "$HOST:/usr/local/bin" & -scp "./lotus-storage-miner" "$HOST:/usr/local/bin" & -scp -C scripts/daemon.service "${HOST}:/etc/systemd/system/lotus-daemon.service" & -scp -C scripts/sminer.service "${HOST}:/etc/systemd/system/lotus-storage-miner.service" & -wait - -ssh "$HOST" 'systemctl daemon-reload' -ssh "$HOST" 'systemctl start lotus-daemon' & -ssh "$HOST" 'systemctl start lotus-storage-miner' & -wait - 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)' & @@ -27,9 +9,8 @@ ssh "$HOST" 'curl http://147.75.80.29:777/send?address=$(cat addr)' & wait echo "SYNC WAIT" +sleep 30 ssh "$HOST" 'lotus sync wait' ssh "$HOST" 'lotus-storage-miner init --owner=$(cat addr)' ssh "$HOST" 'systemctl start lotus-storage-miner' & - -# setup miner actor diff --git a/scripts/deploy-node.sh b/scripts/deploy-node.sh new file mode 100755 index 000000000..e77b0201d --- /dev/null +++ b/scripts/deploy-node.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +HOST=$1 + +# upload binaries +# TODO: destroy + +ssh "$HOST" 'systemctl stop lotus-storage-miner' +ssh "$HOST" 'systemctl stop lotus-daemon' + +ssh "$HOST" 'mkdir -p .lotus .lotusstorage' & +scp "./lotus" "$HOST:/usr/local/bin" & +scp "./lotus-storage-miner" "$HOST:/usr/local/bin" & +scp -C scripts/daemon.service "${HOST}:/etc/systemd/system/lotus-daemon.service" & +scp -C scripts/sminer.service "${HOST}:/etc/systemd/system/lotus-storage-miner.service" & +wait + +ssh "$HOST" 'systemctl daemon-reload' +ssh "$HOST" 'systemctl start lotus-daemon' & +wait + + +# setup miner actor