Files
DFWebOS-Apps/albyhub/exports.sh

15 lines
1.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Проверьте, установлено ли приложение Lightning Node, и если да, экспортируйте необходимые переменные.
installed_apps=$("${DFWEBOS_ROOT}/scripts/app" ls-installed)
if echo "$installed_apps" | grep --quiet -x 'lightning'; then
export APP_ALBYHUB_LN_BACKEND="LND"
export APP_ALBYHUB_LND_ADDRESS="10.21.21.9:10009"
export APP_ALBYHUB_LND_CERT_FILE="/lnd/tls.cert"
# Без `lightning` в качестве зависимости нам необходимо жестко запрограммировать путь к файлу макарон LND.
# Это означает, что Alby Hub в настоящее время работает только с основной сетью.
# Когда в DFWebOS будут поддерживаться дополнительные зависимости, мы сможем вернуться к этому вопросу.
export APP_ALBYHUB_LND_MACAROON_FILE="/lnd/data/chain/bitcoin/mainnet/admin.macaroon"
fi