diff options
author | EuAndreh <eu@euandre.org> | 2019-06-10 10:50:43 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-10 10:50:43 -0300 |
commit | f84c394982a3a872975ee9cb5a1118bea68c1c71 (patch) | |
tree | 887473d067165bd1bb0e804c2898cdb2348d650a | |
parent | Allow shutdown process to fail (diff) | |
download | server-f84c394982a3a872975ee9cb5a1118bea68c1c71.tar.gz server-f84c394982a3a872975ee9cb5a1118bea68c1c71.tar.xz |
Create generated-known-hosts.txt twice
Since it can change after being destroyed by Terraform, we can't create it
before and use it later.
-rwxr-xr-x | scripts/ci/provision.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh index 0d6cfc5..b26a245 100755 --- a/scripts/ci/provision.sh +++ b/scripts/ci/provision.sh @@ -22,6 +22,7 @@ setup_borg_files() { } echo "Shutting down running containers and backing up data..." +echo "${TLD},$(terraform output public_floating_ip) ssh-rsa $(awk '{print $2}' < ./secrets/ssh/vps-box-server.pub)" > ./generated-known-hosts.txt ssh "$TLD" "cd /home/vps/ && docker-compose down" || echo "FAILED TO SHUTDOWN docker-compose" setup_borg_files ./scripts/box/create-backup.env.sh create-backup.sh || echo "FAILED TO COPY FILES" ssh "$TLD" /home/vps/create-backup.sh || echo "FAILED TO CREATE BACKUP." |