install.fairie/home/dot_local/bin/post-installx/executable_post-easyengine.sh

15 lines
493 B
Bash
Raw Normal View History

2024-05-03 19:40:44 -07:00
#!/usr/bin/env bash
# @file EasyEngine
# @brief Configures EasyEngine to use the CloudFlare API for configuring Let's Encrypt
2024-05-27 04:15:03 -07:00
set -euo pipefail
2024-05-03 19:40:44 -07:00
if command -v ee > /dev/null; then
2024-05-27 04:15:03 -07:00
### Ensure secrets
get-secret --exists CLOUDFLARE_EMAIL CLOUDFLARE_API_KEY
### Configure EasyEngine
logg info 'Configuring EasyEngine with CloudFlare automatic SSL insuance'
ee config set le-mail "$(get-secret CLOUDFLARE_EMAIL)"
ee config set cloudflare-api-key "$(get-secret CLOUDFLARE_API_KEY)"
2024-05-03 19:40:44 -07:00
fi