summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-12-05 07:41:50 -0500
committerJesse Luehrs <doy@tozt.net>2018-12-05 07:41:50 -0500
commit5e87e1b907d05ecea7ec39dba0376dd04855214f (patch)
treea4865ac5919ee7f02a3a1b278a77446a34f5750e /bin
parent59715baf043453027d91172aedda60228101f4fc (diff)
downloadpuppet-tozt-5e87e1b907d05ecea7ec39dba0376dd04855214f.tar.gz
puppet-tozt-5e87e1b907d05ecea7ec39dba0376dd04855214f.zip
fix up the mail launch script a bit
Diffstat (limited to 'bin')
-rwxr-xr-xbin/helpers/launch-mail9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/helpers/launch-mail b/bin/helpers/launch-mail
index ff7fb8c..1da13b8 100755
--- a/bin/helpers/launch-mail
+++ b/bin/helpers/launch-mail
@@ -26,7 +26,7 @@ record_id=$(doctl \
tozt.net \
--format Name,Type,ID \
--no-header \
- | grep '^newsmtp2 \+A ' \
+ | grep '^newsmtp \+A ' \
| awk '{print $3}'
)
doctl \
@@ -42,13 +42,12 @@ echo "Done creating DNS entry"
echo "Provisioning droplet..."
-host="${1:-tozt.net}"
conf_location="/usr/local/share/puppet-tozt"
conf_repo="git://github.com/doy/puppet-tozt"
remote() {
# shellcheck disable=SC2029
- ssh root@"$host" "$@"
+ ssh root@"$ip" "$@"
}
ensure_conf_exists() {
@@ -77,13 +76,13 @@ if remote test ! -e /usr/bin/pacman; then
fi
ensure_conf_exists
-scp -r /mnt/puppet/tozt/ root@"$host":/usr/local/share/puppet-tozt/modules/secret/files
+scp -r /mnt/puppet/tozt/ root@"$ip":/usr/local/share/puppet-tozt/modules/secret/files
remote "cd '$conf_location' && puppet apply --modulepath=./modules manifests"
echo "Done provisioning"
echo "Creating DKIM entry"
-dkim=$(remote "perl -pe'chomp; s/.*\"(.*)\".*/\$1/' /mailu/dkim/new.tozt.net.dkim.pub")
+dkim=$(remote "perl -pe'chomp; s/.*\"(.*)\".*/\$1/' /media/persistent/dkim/new.tozt.net.dkim.pub")
dkim_record_id=$(doctl \
-t "$(cat /mnt/digitalocean)" \
compute domain records list \