Files
proxmox/scripts/certbot/print-cloudflare-credentials-from-env.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

32 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# Print Certbot dns-cloudflare "Credentials File Content" from project .env.
# Run from repo root (or any dir with .env). Output is for pasting into
# NPM/Certbot UI "Credentials File Content *" field.
# Usage: ./scripts/certbot/print-cloudflare-credentials-from-env.sh
set -e
REPO_ROOT="${REPO_ROOT:-$(cd -P "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
ENV_FILE="${ENV_FILE:-$REPO_ROOT/.env}"
if [ ! -f "$ENV_FILE" ]; then
echo "Error: .env not found at $ENV_FILE" >&2
echo "Create it from .env.example and set CLOUDFLARE_API_TOKEN or (CLOUDFLARE_EMAIL + CLOUDFLARE_API_KEY)." >&2
exit 1
fi
set +u
# shellcheck source=/dev/null
source "$ENV_FILE"
set -u
if [ -n "${CLOUDFLARE_API_TOKEN:-}" ]; then
echo "dns_cloudflare_api_token = $CLOUDFLARE_API_TOKEN"
elif [ -n "${CLOUDFLARE_EMAIL:-}" ] && [ -n "${CLOUDFLARE_API_KEY:-}" ]; then
echo "dns_cloudflare_email = $CLOUDFLARE_EMAIL"
echo "dns_cloudflare_api_key = $CLOUDFLARE_API_KEY"
else
echo "Error: Set CLOUDFLARE_API_TOKEN or (CLOUDFLARE_EMAIL + CLOUDFLARE_API_KEY) in .env" >&2
echo "See: docs/04-configuration/CLOUDFLARE_CREDENTIALS_BOTH_METHODS.md" >&2
exit 1
fi