mirror of
https://github.com/Retropex/umbrel-apps.git
synced 2025-05-12 11:20:43 +02:00
update bitcoin app exports.sh
This commit is contained in:
parent
3f57ba754f
commit
92f305528e
@ -128,20 +128,24 @@ fi
|
||||
|
||||
{
|
||||
# Migrate settings for app updates differently to fresh installs
|
||||
BITCOIN_INSTALL_EXISTS="false"
|
||||
BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin"
|
||||
if [[ -d "${BITCOIN_DATA_DIR}/blocks" ]] || [[ -d "${BITCOIN_DATA_DIR}/testnet3/blocks" ]] || [[ -d "${BITCOIN_DATA_DIR}/regtest/blocks" ]]
|
||||
IS_POST_ADVANCED_SETTINGS_INSTALL_FILE_PATH="${EXPORTS_APP_DIR}/data/app/IS_POST_ADVANCED_SETTINGS_INSTALL"
|
||||
|
||||
# If no blocks directory exists, we write out a file to indicate that this is a fresh install.
|
||||
# This gets around the issue of the pre-start hook starting up the bitcoind container early for Tor HS creation
|
||||
# and creating the blocks directory.
|
||||
if [[ ! -d "${BITCOIN_DATA_DIR}/blocks" ]] && [[ ! -d "${BITCOIN_DATA_DIR}/testnet3/blocks" ]] && [[ ! -d "${BITCOIN_DATA_DIR}/regtest/blocks" ]]
|
||||
then
|
||||
BITCOIN_INSTALL_EXISTS="true"
|
||||
touch "${IS_POST_ADVANCED_SETTINGS_INSTALL_FILE_PATH}"
|
||||
fi
|
||||
|
||||
APP_CONFIG_EXISTS="false"
|
||||
if [[ -f "${EXPORTS_APP_DIR}/data/app/bitcoin-config.json" ]]
|
||||
then
|
||||
APP_CONFIG_EXISTS="true"
|
||||
APP_CONFIG_EXISTS="true"
|
||||
fi
|
||||
|
||||
if [[ "${BITCOIN_INSTALL_EXISTS}" = "true" ]] && [[ "${APP_CONFIG_EXISTS}" = "false" ]]
|
||||
if [[ ! -f "${IS_POST_ADVANCED_SETTINGS_INSTALL_FILE_PATH}" ]] && [[ "${APP_CONFIG_EXISTS}" = "false" ]]
|
||||
then
|
||||
# This app is not a fresh install, it's being updated, so preserve existing clearnet over Tor setting
|
||||
export BITCOIN_INITIALIZE_WITH_CLEARNET_OVER_TOR="true"
|
||||
|
Loading…
Reference in New Issue
Block a user