From 0cc23b9f6eac8864e0797dc286912b8fb19ef6fb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 11 May 2022 21:55:50 -0400 Subject: [PATCH] feat: re-enable letsencrypt when adding or setting domains Closes #248 --- post-domains-update | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 post-domains-update diff --git a/post-domains-update b/post-domains-update new file mode 100755 index 0000000..294e883 --- /dev/null +++ b/post-domains-update @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -eo pipefail +[[ $DOKKU_TRACE ]] && set -x + +trigger-letsencrypt-post-domains-update() { + declare desc="updates cert file when domains are added or set" + declare trigger="post-domains-update" + declare APP="$1" ACTION="$2" + + if [[ "$ACTION" == "add" ]] || [[ "$ACTION" == "set" ]]; then + dokku letsencrypt:enable "$APP" + fi +} + +trigger-letsencrypt-post-domains-update "$@"