Skip to content

Commit 0d7e6c3

Browse files
Implement LE Pre- and Post Hooks. (hestiacp#4925)
* Implement LE Pre- and Post Hooks. * Improve if validatin checks and add arguments, thx @sahsanu! * Run Formatting --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 77efcdc commit 0d7e6c3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ if [[ "$LE_STAGING" = 'yes' ]]; then
3434
LE_API='https://acme-staging-v02.api.letsencrypt.org'
3535
fi
3636

37+
# LE Pre-Hook
38+
if [ -x "/etc/hestiacp/hooks/le_pre.sh" ]; then
39+
/etc/hestiacp/hooks/le_pre.sh "$user" "$domain" "$aliases" "$mail"
40+
fi
41+
3742
# encode base64
3843
encode_base64() {
3944
cat | base64 | tr '+/' '-_' | tr -d '\r\n='
@@ -611,6 +616,11 @@ else
611616
update_object_value 'mail' 'DOMAIN' "$root_domain" '$LETSENCRYPT_FAIL_COUNT' "0"
612617
fi
613618

619+
# LE Post-Hook
620+
if [ -x "/etc/hestiacp/hooks/le_post.sh" ]; then
621+
/etc/hestiacp/hooks/le_post.sh "$user" "$domain" "$aliases" "$mail"
622+
fi
623+
614624
# Remove challenge folder if exist
615625
if [ -n "$well_known" ]; then
616626
rm -fr $well_known

0 commit comments

Comments
 (0)