btcpay update to v1.7.1 (#3482)

btcpay update to v1.7.1
This commit is contained in:
openoms
2022-12-06 17:55:31 +00:00
committed by GitHub
parent d715422e62
commit df74c87e2c
2 changed files with 50 additions and 29 deletions

View File

@@ -11,6 +11,7 @@
- Update: RTL v0.13.0 with update option [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.12.3) - Update: RTL v0.13.0 with update option [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.12.3)
- Update: Thunderhub v0.13.16 with balance sharing disabled [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.16) - Update: Thunderhub v0.13.16 with balance sharing disabled [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.16)
- Update: LNbits 0.9.4 [details](https://github.com/lnbits/lnbits-legend/releases/tag/0.9.2) - Update: LNbits 0.9.4 [details](https://github.com/lnbits/lnbits-legend/releases/tag/0.9.2)
- Update: BTCPayServer 1.7.1 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.7.1)
- Update: ItchySats 0.7.0 [details](https://github.com/itchysats/itchysats/releases/tag/0.7.0) - Update: ItchySats 0.7.0 [details](https://github.com/itchysats/itchysats/releases/tag/0.7.0)
- Update: Channel Tools (chantools) v0.10.5 [details](https://github.com/guggero/chantools/releases/tag/v0.10.5) - Update: Channel Tools (chantools) v0.10.5 [details](https://github.com/guggero/chantools/releases/tag/v0.10.5)
- Update: Jam (JoinMarket Web UI) v0.1.2 [details](https://github.com/joinmarket-webui/joinmarket-webui/releases/tag/v0.1.0) - Update: Jam (JoinMarket Web UI) v0.1.2 [details](https://github.com/joinmarket-webui/joinmarket-webui/releases/tag/v0.1.0)

View File

@@ -3,9 +3,9 @@
# Based on: https://gist.github.com/normandmickey/3f10fc077d15345fb469034e3697d0d0 # Based on: https://gist.github.com/normandmickey/3f10fc077d15345fb469034e3697d0d0
# https://github.com/dgarage/NBXplorer/tags # https://github.com/dgarage/NBXplorer/tags
NBXplorerVersion="v2.3.28" NBXplorerVersion="v2.3.49"
# https://github.com/btcpayserver/btcpayserver/releases # https://github.com/btcpayserver/btcpayserver/releases
BTCPayVersion="v1.6.1" BTCPayVersion="v1.7.1"
# command info # command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -20,32 +20,41 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
fi fi
source /mnt/hdd/raspiblitz.conf source /mnt/hdd/raspiblitz.conf
# get cpu architecture # get cpu architecture (checked with 'uname -m')
source /home/admin/raspiblitz.info source /home/admin/raspiblitz.info
source <(/home/admin/_cache.sh get state) source <(/home/admin/_cache.sh get state)
function postgresConfig() { function postgresConfig() {
# https://github.com/rootzoll/raspiblitz/issues/3218 # https://github.com/rootzoll/raspiblitz/issues/3218
echo "# Install postgres" echo "# Install postgres"
sudo apt install -y postgresql if sudo apt install -y postgresql-13; then
PGVERSION=13
echo "# Move the postgres data to /mnt/hdd/app-data/postgresql" elif sudo apt install -y postgresql-12; then
PGVERSION=12
fi
# sudo -u postgres psql -c "show data_directory" # sudo -u postgres psql -c "show data_directory"
# /var/lib/postgresql/13/main # /var/lib/postgresql/13/main
if [ ! -d /var/lib/postgresql ]; then if [ ! -d /var/lib/postgresql/${PGVERSION}/main ]; then
sudo mkdir -p /var/lib/postgresql/13/main sudo mkdir -p /var/lib/postgresql/${PGVERSION}/main
sudo chown -R postgres:postgres /var/lib/postgresql sudo chown -R postgres:postgres /var/lib/postgresql
# sudo pg_dropcluster 13 main sudo systemctl start postgresql@${PGVERSION}-main
sudo pg_createcluster 13 main --start
fi fi
sudo systemctl stop postgresql 2>/dev/null if [ ! -L /var/lib/postgresql ]; then
echo "# Move the postgres data to /mnt/hdd/app-data/postgresql"
# stop the postgresql servers
sudo su - postgres -c "/usr/lib/postgresql/${PGVERSION}/bin/pg_ctl stop --wait --pgdata=/var/lib/postgresql/${PGVERSION}/main"
sudo systemctl stop postgresql@${PGVERSION}-main
sudo rsync -av /var/lib/postgresql /mnt/hdd/app-data sudo rsync -av /var/lib/postgresql /mnt/hdd/app-data
sudo mv /var/lib/postgresql /var/lib/postgresql.bak sudo mv /var/lib/postgresql /var/lib/postgresql.bak
sudo rm -rf /var/lib/postgresql # not a symlink.. delete it silently sudo rm -rf /var/lib/postgresql # not a symlink.. delete it silently
sudo ln -s /mnt/hdd/app-data/postgresql /var/lib/ sudo ln -s /mnt/hdd/app-data/postgresql /var/lib/
sudo chown -R postgres:postgres /mnt/hdd/app-data/postgresql
sudo systemctl enable postgresql sudo chmod -R 0700 /mnt/hdd/app-data/postgresql
sudo systemctl start postgresql # start
sudo systemctl start postgresql@${PGVERSION}-main
fi
echo "# Check clusters with: pg_lsclusters"
pg_lsclusters
echo "# Generate the database" echo "# Generate the database"
sudo -u postgres psql -c "create database nbxplorermainnet;" sudo -u postgres psql -c "create database nbxplorermainnet;"
@@ -55,6 +64,14 @@ function postgresConfig() {
# sudo -u btcpay sed -i "s/Password=*/Password='${newPassword}';/g" /home/btcpay/.nbxplorer/Main/settings.config # sudo -u btcpay sed -i "s/Password=*/Password='${newPassword}';/g" /home/btcpay/.nbxplorer/Main/settings.config
# sudo -u btcpay sed -i "s/Password=*/Password='${newPassword}';/g" /home/btcpay/.btcpayserver/Main/settings.config # sudo -u btcpay sed -i "s/Password=*/Password='${newPassword}';/g" /home/btcpay/.btcpayserver/Main/settings.config
sudo -u postgres psql -c "grant all privileges on database nbxplorermainnet to nbxplorer;" sudo -u postgres psql -c "grant all privileges on database nbxplorermainnet to nbxplorer;"
echo "# List databases with: sudo -u postgres psql -c '\l'"
sudo -u postgres psql -c '\l'
## clean postgresql:
# sudo su - postgres -c "/usr/lib/postgresql/${PGVERSION}/bin/pg_ctl stop --wait --pgdata=/var/lib/postgresql/${PGVERSION}/main"
# sudo pg_dropcluster ${PGVERSION} main
# sudo apt remove postgresql -y --purge
# sudo apt remove postgresql-${PGVERSION} -y --purge
} }
function NBXplorerConfig() { function NBXplorerConfig() {
@@ -71,9 +88,8 @@ btc.rpc.password=${PASSWORD_B}
postgres=User ID=nbxplorer;Host=localhost;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorermainnet;Password='raspiblitz'; postgres=User ID=nbxplorer;Host=localhost;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorermainnet;Password='raspiblitz';
automigrate=1 automigrate=1
nomigrateevts=1 nomigrateevts=1
" | sudo tee /home/btcpay/.nbxplorer/Main/settings.config " | sudo -u btcpay tee /home/btcpay/.nbxplorer/Main/settings.config
sudo chmod 600 /home/btcpay/.nbxplorer/Main/settings.config sudo chmod 600 /home/btcpay/.nbxplorer/Main/settings.config
sudo chown btcpay:btcpay /home/btcpay/.nbxplorer/Main/settings.config
} }
function BtcPayConfig() { function BtcPayConfig() {
@@ -373,6 +389,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# dependencies # dependencies
sudo apt-get -y install libunwind8 gettext libssl1.0 sudo apt-get -y install libunwind8 gettext libssl1.0
cpu=$(uname -m)
if [ "${cpu}" = "aarch64" ]; then if [ "${cpu}" = "aarch64" ]; then
binaryVersion="arm64" binaryVersion="arm64"
dotNetdirectLink="https://download.visualstudio.microsoft.com/download/pr/d43345e2-f0d7-4866-b56e-419071f30ebe/68debcece0276e9b25a65ec5798cf07b/dotnet-sdk-6.0.101-linux-arm64.tar.gz" dotNetdirectLink="https://download.visualstudio.microsoft.com/download/pr/d43345e2-f0d7-4866-b56e-419071f30ebe/68debcece0276e9b25a65ec5798cf07b/dotnet-sdk-6.0.101-linux-arm64.tar.gz"
@@ -441,10 +458,12 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "# Build NBXplorer ..." echo "# Build NBXplorer ..."
# from the build.sh with path # from the build.sh with path
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj
# see the configuration options with: ## see the configuration options with:
# sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release -p "NBXplorer/NBXplorer.csproj" -c /home/btcpay/.nbxplorer/Main/settings.config -h # sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release --project "NBXplorer/NBXplorer.csproj" -c /home/btcpay/.nbxplorer/Main/settings.config -h
# run manually to debug: ##sudo systenmct run manually to debug:
# sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release -p "NBXplorer/NBXplorer.csproj" -c /home/btcpay/.nbxplorer/Main/settings.config --network=mainnet -- $@ # sudo su - btcpay
# cd NBXplorer
# /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release --project "NBXplorer/NBXplorer.csproj" -- $@
echo "# create the nbxplorer.service" echo "# create the nbxplorer.service"
echo " echo "
[Unit] [Unit]
@@ -523,6 +542,7 @@ WantedBy=multi-user.target
#sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \ #sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \
# "web-flow" "https://github.com/web-flow.gpg" "4AEE18F83AFDEB23" || exit 1 # "web-flow" "https://github.com/web-flow.gpg" "4AEE18F83AFDEB23" || exit 1
PGPsigner="nicolasdorier" PGPsigner="nicolasdorier"
PGPpubkeyLink="https://keybase.io/nicolasdorier/pgp_keys.asc" PGPpubkeyLink="https://keybase.io/nicolasdorier/pgp_keys.asc"
PGPpubkeyFingerprint="AB4CFA9895ACA0DBE27F6B346618763EF09186FE" PGPpubkeyFingerprint="AB4CFA9895ACA0DBE27F6B346618763EF09186FE"
@@ -539,7 +559,7 @@ WantedBy=multi-user.target
# see the configuration options with: # see the configuration options with:
# sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release -p "/home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj" -- -h # sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release -p "/home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj" -- -h
# run manually to debug: # run manually to debug:
# sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release -p "/home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj" -- --sqlitefile=sqllite.db --network=mainnet # sudo -u btcpay /home/btcpay/dotnet/dotnet run --no-launch-profile --no-build -c Release --project "/home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj" -- --sqlitefile=sqllite.db
echo "# create the btcpayserver.service" echo "# create the btcpayserver.service"
echo " echo "
[Unit] [Unit]
@@ -586,10 +606,10 @@ WantedBy=multi-user.target
fi fi
sudo -u btcpay mkdir -p /home/btcpay/.btcpayserver/Main/ sudo -u btcpay mkdir -p /home/btcpay/.btcpayserver/Main/
if [ ${lnd} = on ]; then if [ "${lnd}" = on ]; then
/home/admin/config.scripts/bonus.btcpayserver.sh write-tls-macaroon /home/admin/config.scripts/bonus.btcpayserver.sh write-tls-macaroon
fi fi
if [ ${cl} = on ]; then if [ "${cl}" = on ]; then
/home/admin/config.scripts/bonus.btcpayserver.sh cln-lightning-rpc-access /home/admin/config.scripts/bonus.btcpayserver.sh cln-lightning-rpc-access
fi fi
else else