Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- 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>
40 lines
1.5 KiB
Bash
Executable File
40 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Print Certbot dns-cloudns "Credentials File Content" from project .env.
|
|
# Run from repo root (or any dir with .env). Output is for pasting into
|
|
# NPMplus: Add TLS Certificate → DNS Challenge → ClouDNS → "Credentials File Content *".
|
|
# Usage: ./scripts/certbot/print-cloudns-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 CLOUDNS_AUTH_ID and CLOUDNS_AUTH_PASSWORD." >&2
|
|
exit 1
|
|
fi
|
|
|
|
set +u
|
|
# shellcheck source=/dev/null
|
|
source "$ENV_FILE"
|
|
set -u
|
|
|
|
if [ -z "${CLOUDNS_AUTH_ID:-}" ] || [ -z "${CLOUDNS_AUTH_PASSWORD:-}" ]; then
|
|
echo "Error: Set CLOUDNS_AUTH_ID and CLOUDNS_AUTH_PASSWORD in .env" >&2
|
|
echo "See: .env.example (ClouDNS section), https://www.cloudns.net/api-settings/" >&2
|
|
echo "" >&2
|
|
echo "If you prefer Cloudflare DNS challenge instead, use DNS Challenge → Cloudflare" >&2
|
|
echo "and run: ./scripts/certbot/print-cloudflare-credentials-from-env.sh" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Use 'key = value' format (spaces) so NPM/Certbot parser reliably finds both properties
|
|
echo "dns_cloudns_auth_id = $CLOUDNS_AUTH_ID"
|
|
echo "dns_cloudns_auth_password = $CLOUDNS_AUTH_PASSWORD"
|
|
|
|
if [ -n "${CLOUDNS_SUB_AUTH_ID:-}" ]; then
|
|
echo "dns_cloudns_sub_auth_id = $CLOUDNS_SUB_AUTH_ID"
|
|
elif [ -n "${CLOUDNS_SUB_AUTH_USER:-}" ]; then
|
|
echo "dns_cloudns_sub_auth_user = $CLOUDNS_SUB_AUTH_USER"
|
|
fi
|