lotus/scripts/deploy-node.sh
2019-10-15 04:11:24 +02:00

24 lines
586 B
Bash
Executable File

#!/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