install.fairie/home/dot_local/bin/post-installx/executable_post-easyengine.sh
Brian Zalewski e8167f13b7 Many changes
2024-05-27 11:15:03 +00:00

15 lines
No EOL
493 B
Bash

#!/usr/bin/env bash
# @file EasyEngine
# @brief Configures EasyEngine to use the CloudFlare API for configuring Let's Encrypt
set -euo pipefail
if command -v ee > /dev/null; then
### 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)"
fi