committed by
GitHub
8 changed files with 117 additions and 86 deletions
@ -0,0 +1,25 @@ |
|||||
|
{ |
||||
|
"multiPass": "$APP_PASSWORD", |
||||
|
"defaultNodeIndex": 1, |
||||
|
"SSO": { |
||||
|
"rtlSSO": 0, |
||||
|
"rtlCookiePath": "", |
||||
|
"logoutRedirectLink": "" |
||||
|
}, |
||||
|
"nodes": [ |
||||
|
{ |
||||
|
"index": 1, |
||||
|
"lnNode": "CLN Umbrel", |
||||
|
"authentication": { |
||||
|
"configPath": "" |
||||
|
}, |
||||
|
"settings": { |
||||
|
"userPersona": "MERCHANT", |
||||
|
"themeMode": "NIGHT", |
||||
|
"themeColor": "YELLOW", |
||||
|
"enableLogging": true, |
||||
|
"fiatConversion": true |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
# Dynamically export the block explorer URL based on what network the Bitcoin node is running on |
||||
|
|
||||
|
BLOCK_EXPLORER_URL="https://mempool.space" |
||||
|
|
||||
|
# TODO: check for umbrelOS Mempool app and use local URL if installed |
||||
|
# e.g., "${UMBREL_ROOT}/scripts/app" ls-installed | grep --quiet 'mempool' |
||||
|
# RTL would need a way to dynamically construct the URL for the local Mempool app |
||||
|
# e.g., localExplorerUrl = `${window.location.protocol}//${window.location.hostname}:${LOCAL_MEMPOOL_PORT}`; |
||||
|
|
||||
|
# Append APP_BITCOIN_NETWORK to the URL if it is not mainnet (e.g., https://mempool.space/testnet) |
||||
|
if [[ "${APP_BITCOIN_NETWORK}" != "mainnet" ]]; then |
||||
|
echo "Bitcoin is running on ${APP_BITCOIN_NETWORK}. Appending ${APP_BITCOIN_NETWORK} to the block explorer URL." |
||||
|
BLOCK_EXPLORER_URL="${BLOCK_EXPLORER_URL}/${APP_BITCOIN_NETWORK}" |
||||
|
echo "BLOCK_EXPLORER_URL: ${BLOCK_EXPLORER_URL}" |
||||
|
fi |
||||
|
|
||||
|
export APP_CORE_RTL_BLOCK_EXPLORER_URL="${BLOCK_EXPLORER_URL}" |
@ -0,0 +1,40 @@ |
|||||
|
#!/usr/bin/env bash |
||||
|
|
||||
|
# This pre-start script ensures that legacy Core-Lightning-RTL installs receive the default RTL-Config.json file on update. |
||||
|
|
||||
|
APP_DATA_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")" |
||||
|
RTL_CONFIG_FILE="${APP_DATA_DIR}/data/rtl/RTL-Config.json" |
||||
|
|
||||
|
# We check if the RTL config file does not exist or if it exists and lnImplementation is set to "LND", which tells us that this is a legacy RTL install that needs to be modified. |
||||
|
if [ ! -f "${RTL_CONFIG_FILE}" ] || jq -e '.nodes[] | select(.lnImplementation == "LND")' "${RTL_CONFIG_FILE}" >/dev/null 2>&1; then |
||||
|
echo "Creating a default configuration file for RTL." |
||||
|
# We overwrite/create the RTL configuration file with settings for CLN Umbrel |
||||
|
# RTL-Config.json is owned by root |
||||
|
cat >"${RTL_CONFIG_FILE}" <<EOF |
||||
|
{ |
||||
|
"multiPass": "${APP_PASSWORD}", |
||||
|
"defaultNodeIndex": 1, |
||||
|
"SSO": { |
||||
|
"rtlSSO": 0, |
||||
|
"rtlCookiePath": "", |
||||
|
"logoutRedirectLink": "" |
||||
|
}, |
||||
|
"nodes": [ |
||||
|
{ |
||||
|
"index": 1, |
||||
|
"lnNode": "CLN Umbrel", |
||||
|
"authentication": { |
||||
|
"configPath": "" |
||||
|
}, |
||||
|
"settings": { |
||||
|
"userPersona": "MERCHANT", |
||||
|
"themeMode": "NIGHT", |
||||
|
"themeColor": "YELLOW", |
||||
|
"enableLogging": true, |
||||
|
"fiatConversion": true |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
EOF |
||||
|
fi |
Loading…
Reference in new issue