mirror of
https://github.com/mynodebtc/mynode.git
synced 2025-01-11 11:29:27 +00:00
Fix auto re-install of BTCPay Server if uninstalled
This commit is contained in:
parent
74dd7da776
commit
ddb4d30ada
|
@ -9,6 +9,7 @@
|
|||
- Upgrade Loop to v0.14.1
|
||||
- Upgrade LiT to v0.5.0
|
||||
- Upgrade BoS to v10.2.0
|
||||
- Upgrade LNDHub to v1.3.5
|
||||
- Upgrade RTL to v0.11.0
|
||||
- Upgrade JoinInBox to v0.5.0
|
||||
- Upgrade PyBlock to v0.9.8.6
|
||||
|
|
|
@ -48,6 +48,7 @@ while true; do
|
|||
fi
|
||||
touch /tmp/need_application_refresh
|
||||
|
||||
|
||||
# Upgrade mempool
|
||||
MEMPOOL_UPGRADE_URL=https://github.com/mempool/mempool/archive/${MEMPOOL_VERSION}.tar.gz
|
||||
echo "Checking for new mempool..."
|
||||
|
@ -91,6 +92,20 @@ while true; do
|
|||
fi
|
||||
touch /tmp/need_application_refresh
|
||||
|
||||
|
||||
# Upgrade BTCPay Server (docker compose does install, just need version file update)
|
||||
if should_install_app "btcpayserver" ; then
|
||||
CURRENT=""
|
||||
if [ -f $BTCPAYSERVER_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $BTCPAYSERVER_VERSION_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$BTCPAYSERVER_VERSION" ]; then
|
||||
echo $BTCPAYSERVER_VERSION > $BTCPAYSERVER_VERSION_FILE
|
||||
fi
|
||||
fi
|
||||
touch /tmp/need_application_refresh
|
||||
|
||||
|
||||
# Install Dojo
|
||||
DOJO_UPGRADE_URL=https://code.samourai.io/dojo/samourai-dojo/-/archive/$DOJO_VERSION/samourai-dojo-$DOJO_VERSION.tar.gz
|
||||
DOJO_UPGRADE_URL_FILE=/mnt/hdd/mynode/settings/dojo_url
|
||||
|
|
|
@ -517,7 +517,7 @@ if [ ! -f /usr/include/secp256k1_ecdh.h ]; then
|
|||
cp -f include/* /usr/include/
|
||||
fi
|
||||
|
||||
# Upgrade JoinMarket
|
||||
# Upgrade JoinMarket (legacy)
|
||||
if should_install_app "joinmarket" ; then
|
||||
echo "Upgrading JoinMarket..." # Old
|
||||
if [ $IS_RASPI = 1 ] || [ $IS_X86 = 1 ]; then
|
||||
|
@ -556,6 +556,7 @@ if should_install_app "joinmarket" ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Upgrade JoininBox
|
||||
echo "Upgrading JoinInBox..."
|
||||
if should_install_app "joininbox" ; then
|
||||
if [ $IS_RASPI = 1 ] || [ $IS_X86 = 1 ]; then
|
||||
|
|
|
@ -396,7 +396,6 @@ if [ -f /opt/mynode/btcpayserver/.env ]; then
|
|||
sed -i "s/REPLACE_BTCPAY_VERSION/$BTCPAYSERVER_VERSION/g" /opt/mynode/btcpayserver/.env || true
|
||||
sed -i "s/REPLACE_NBXPLORER_VERSION/$BTCPAYSERVER_NBXPLORER_VERSION/g" /opt/mynode/btcpayserver/.env || true
|
||||
fi
|
||||
echo $BTCPAYSERVER_VERSION > $BTCPAYSERVER_VERSION_FILE
|
||||
|
||||
# BTC RPC Explorer Config
|
||||
mkdir -p /opt/mynode/btc-rpc-explorer
|
||||
|
|
|
@ -21,12 +21,12 @@ rm -f /home/bitcoin/.mynode/install_${APP} || true
|
|||
rm -f /mnt/hdd/mynode/settings/install_${APP} || true
|
||||
sync
|
||||
|
||||
# Attempt generic uninstall
|
||||
rm -rf /opt/mynode/${APP}
|
||||
|
||||
# Custom uninstall steps
|
||||
if [ "$APP" = "bos" ]; then
|
||||
npm uninstall -g balanceofsatoshis
|
||||
elif [ "$APP" = "btcpayserver" ]; then
|
||||
. "/opt/mynode/btcpayserver/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY" && . helpers.sh && btcpay_remove
|
||||
cd ~
|
||||
elif [ "$APP" = "btcrpcexplorer" ]; then
|
||||
rm -rf /opt/mynode/btc-rpc-explorer
|
||||
elif [ "$APP" = "dojo" ]; then
|
||||
|
@ -49,6 +49,9 @@ else
|
|||
echo "No custom uninstall steps"
|
||||
fi
|
||||
|
||||
# Attempt generic uninstall
|
||||
rm -rf /opt/mynode/${APP}
|
||||
|
||||
|
||||
chown -R admin:admin /home/admin/upgrade_logs
|
||||
sync
|
Loading…
Reference in New Issue
Block a user