hold NBXplorer version #3055

This commit is contained in:
openoms 2022-05-10 10:01:26 +01:00
parent 1c74739a12
commit 66061e6a9b
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -433,7 +433,7 @@ btc.rpc.password=$PASSWORD_B
sudo -u btcpay git clone https://github.com/btcpayserver/btcpayserver.git 2>/dev/null sudo -u btcpay git clone https://github.com/btcpayserver/btcpayserver.git 2>/dev/null
cd btcpayserver cd btcpayserver
sudo -u btcpay git reset --hard $BTCPayVersion sudo -u btcpay git reset --hard $BTCPayVersion
# 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
sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \ sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \
@ -508,7 +508,7 @@ WantedBy=multi-user.target
# setting value in raspi blitz config # setting value in raspi blitz config
/home/admin/config.scripts/blitz.conf.sh set BTCPayServer "on" /home/admin/config.scripts/blitz.conf.sh set BTCPayServer "on"
# needed for API/WebUI as signal that install ran thru # needed for API/WebUI as signal that install ran thru
echo "result='OK'" echo "result='OK'"
exit 0 exit 0
fi fi
@ -584,53 +584,54 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
echo "# BTCPayServer is not installed." echo "# BTCPayServer is not installed."
fi fi
# needed for API/WebUI as signal that install ran thru # needed for API/WebUI as signal that install ran thru
echo "result='OK'" echo "result='OK'"
fi fi
if [ "$1" = "update" ]; then if [ "$1" = "update" ]; then
echo "# Update NBXplorer" ## don't update NBXplorer until https://github.com/rootzoll/raspiblitz/issues/3055 is solved
cd /home/btcpay || exit 1 # echo "# Update NBXplorer"
cd NBXplorer || exit 1 # cd /home/btcpay || exit 1
# fetch latest master # cd NBXplorer || exit 1
if [ "$(sudo -u btcpay git fetch 2>&1 | grep -c "Please tell me who you are")" -gt 0 ]; then # # fetch latest master
sudo -u btcpay git config user.email "you@example.com" # if [ "$(sudo -u btcpay git fetch 2>&1 | grep -c "Please tell me who you are")" -gt 0 ]; then
sudo -u btcpay git config user.name "Your Name" # sudo -u btcpay git config user.email "you@example.com"
fi # sudo -u btcpay git config user.name "Your Name"
sudo -u btcpay git fetch # fi
# unset $1 # sudo -u btcpay git fetch
set -- # # unset $1
UPSTREAM=${1:-'@{u}'} # set --
LOCAL=$(git rev-parse @) # UPSTREAM=${1:-'@{u}'}
REMOTE=$(git rev-parse "$UPSTREAM") # LOCAL=$(git rev-parse @)
# REMOTE=$(git rev-parse "$UPSTREAM")
if [ $LOCAL = $REMOTE ]; then #
TAG=$(git tag | sort -V | tail -1) # if [ $LOCAL = $REMOTE ]; then
echo "# Up-to-date on version $TAG" # TAG=$(git tag | sort -V | tail -1)
else # echo "# Up-to-date on version $TAG"
echo "# Pulling latest changes..." # else
sudo -u btcpay git pull -p # echo "# Pulling latest changes..."
TAG=$(git tag | sort -V | tail -1) # sudo -u btcpay git pull -p
echo "# Reset to the latest release tag: $TAG" # TAG=$(git tag | sort -V | tail -1)
sudo -u btcpay git reset --hard $TAG # echo "# Reset to the latest release tag: $TAG"
sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \ # sudo -u btcpay git reset --hard $TAG
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1 # sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh \
echo "# Build NBXplorer ..." # "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
# from the build.sh with path # echo "# Build NBXplorer ..."
sudo systemctl stop nbxplorer # # from the build.sh with path
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj # sudo systemctl stop nbxplorer
# sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj
# whitelist localhost in bitcoind #
if ! sudo grep -Eq "^whitelist=127.0.0.1" /mnt/hdd/bitcoin/bitcoin.conf;then # # whitelist localhost in bitcoind
echo "whitelist=127.0.0.1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf # if ! sudo grep -Eq "^whitelist=127.0.0.1" /mnt/hdd/bitcoin/bitcoin.conf;then
echo "# Restarting bitcoind" # echo "whitelist=127.0.0.1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf
sudo systemctl restart bitcoind # echo "# Restarting bitcoind"
fi # sudo systemctl restart bitcoind
# fi
sudo systemctl start nbxplorer #
echo "# Updated NBXplorer to $TAG" # sudo systemctl start nbxplorer
fi # echo "# Updated NBXplorer to $TAG"
# fi
echo "# Update BTCPayServer" echo "# Update BTCPayServer"
cd /home/btcpay || exit 1 cd /home/btcpay || exit 1
@ -646,7 +647,7 @@ if [ "$1" = "update" ]; then
UPSTREAM=${1:-'@{u}'} UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @) LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM") REMOTE=$(git rev-parse "$UPSTREAM")
if [ $LOCAL = $REMOTE ]; then if [ $LOCAL = $REMOTE ]; then
TAG=$(git tag | grep v1 | sort -V | tail -1) TAG=$(git tag | grep v1 | sort -V | tail -1)
echo "# Up-to-date on version $TAG" echo "# Up-to-date on version $TAG"