From 8b093a2f2acb24a4a1d37974712b28ad1b005210 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Tue, 15 Mar 2022 22:53:14 -0500 Subject: [PATCH] Reset BTCPaySever env files if re-installed --- rootfs/standard/usr/bin/mynode_reinstall_app.sh | 4 ++++ rootfs/standard/usr/bin/mynode_uninstall_app.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/rootfs/standard/usr/bin/mynode_reinstall_app.sh b/rootfs/standard/usr/bin/mynode_reinstall_app.sh index 12eb3790..55325aae 100755 --- a/rootfs/standard/usr/bin/mynode_reinstall_app.sh +++ b/rootfs/standard/usr/bin/mynode_reinstall_app.sh @@ -34,6 +34,10 @@ elif [ "$APP" = "netdata" ]; then systemctl stop netdata docker rmi netdata/netdata || true elif [ "$APP" = "btcpayserver" ]; then + cp /usr/share/btcpayserver/env /opt/mynode/btcpayserver/.env + cp /usr/share/btcpayserver/btcpay-env.sh /opt/mynode/btcpayserver/ + cp /usr/share/btcpayserver/docker-compose.generated.yml /opt/mynode/btcpayserver/ + cp /usr/share/btcpayserver/helpers.sh /opt/mynode/btcpayserver/ . "/opt/mynode/btcpayserver/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY" && . helpers.sh && btcpay_remove cd ~ elif [ "$APP" = "tor" ]; then diff --git a/rootfs/standard/usr/bin/mynode_uninstall_app.sh b/rootfs/standard/usr/bin/mynode_uninstall_app.sh index 4afa89d2..6aeaa120 100755 --- a/rootfs/standard/usr/bin/mynode_uninstall_app.sh +++ b/rootfs/standard/usr/bin/mynode_uninstall_app.sh @@ -25,6 +25,10 @@ sync if [ "$APP" = "bos" ]; then npm uninstall -g balanceofsatoshis elif [ "$APP" = "btcpayserver" ]; then + cp /usr/share/btcpayserver/env /opt/mynode/btcpayserver/.env + cp /usr/share/btcpayserver/btcpay-env.sh /opt/mynode/btcpayserver/ + cp /usr/share/btcpayserver/docker-compose.generated.yml /opt/mynode/btcpayserver/ + cp /usr/share/btcpayserver/helpers.sh /opt/mynode/btcpayserver/ . "/opt/mynode/btcpayserver/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY" && . helpers.sh && btcpay_remove cd ~ elif [ "$APP" = "btcrpcexplorer" ]; then