diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-10-16 23:15:09 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-10-16 23:15:09 -0400 |
commit | 6c58c57881299a2932360a7726aa6f8997476773 (patch) | |
tree | e4a7472aee5b91cf3b5ac800b5b540676e714b09 /bin/terminate | |
parent | bd4b8406ddf02f6223fc1f508c4102d42765ead7 (diff) | |
download | puppet-tozt-6c58c57881299a2932360a7726aa6f8997476773.tar.gz puppet-tozt-6c58c57881299a2932360a7726aa6f8997476773.zip |
more script fixes
Diffstat (limited to 'bin/terminate')
-rwxr-xr-x | bin/terminate | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/terminate b/bin/terminate index 7631206..23aab67 100755 --- a/bin/terminate +++ b/bin/terminate @@ -2,9 +2,14 @@ set -eu set -o pipefail +script_path="$(realpath "$(dirname "$0")")" +secrets_bin="${script_path}/secrets" + case "$1" in tozt|algo) - doctl compute droplet delete "$1" + "$secrets_bin" open + trap '"$secrets_bin" close' EXIT + doctl -t "$(cat /mnt/digitalocean)" compute droplet delete "$1" ;; *) echo "unknown host $1" >&2 |