mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-03-01 00:59:23 +01:00
break scripts on fatal failures (#3658)
This commit is contained in:
parent
b0567148ce
commit
0a6b450684
4 changed files with 9 additions and 20 deletions
|
@ -399,10 +399,7 @@ if [ "$1" = "install" ]; then
|
|||
sudo -u btcpay /home/admin/config.scripts/blitz.git-verify.sh "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
|
||||
echo "# Build NBXplorer $NBXplorerVersion"
|
||||
# from the build.sh with path
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj || (
|
||||
echo "# Build failed"
|
||||
exit 1
|
||||
)
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj || exit 1
|
||||
|
||||
# BTCPayServer
|
||||
echo "# Install BTCPayServer"
|
||||
|
@ -423,10 +420,7 @@ if [ "$1" = "install" ]; then
|
|||
echo "# Build BTCPayServer $BTCPayVersion"
|
||||
# from the build.sh with path
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release \
|
||||
/home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj || (
|
||||
echo "# Build failed"
|
||||
exit 1
|
||||
)
|
||||
/home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj || exit 1
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
@ -757,10 +751,8 @@ if [ "$1" = "update" ]; then
|
|||
echo "# Build NBXplorer $TAG"
|
||||
# from the build.sh with path
|
||||
sudo systemctl stop nbxplorer
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj || (
|
||||
echo "# Build failed"
|
||||
exit 1
|
||||
)
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release NBXplorer/NBXplorer.csproj || exit 1
|
||||
|
||||
# whitelist localhost in bitcoind
|
||||
if ! sudo grep -Eq "^whitelist=127.0.0.1" /mnt/hdd/bitcoin/bitcoin.conf; then
|
||||
echo "whitelist=127.0.0.1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf
|
||||
|
@ -813,10 +805,7 @@ if [ "$1" = "update" ]; then
|
|||
echo "# Build BTCPayServer $TAG"
|
||||
# from the build.sh with path
|
||||
sudo systemctl stop btcpayserver
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release /home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj || (
|
||||
echo "# Build failed"
|
||||
exit 1
|
||||
)
|
||||
sudo -u btcpay /home/btcpay/dotnet/dotnet build -c Release /home/btcpay/btcpayserver/BTCPayServer/BTCPayServer.csproj || exit 1
|
||||
sudo systemctl start btcpayserver
|
||||
echo "# Updated BTCPayServer to $TAG"
|
||||
fi
|
||||
|
|
|
@ -52,10 +52,10 @@ if [ "$1" = on ]; then
|
|||
curl https://raw.githubusercontent.com/Electron-Cash/keys-n-hashes/master/pubkeys/calinkey.txt | sudo -u fulcrum gpg --import
|
||||
|
||||
# look for 'Good signature'
|
||||
sudo -u fulcrum gpg --verify Fulcrum-${fulcrumVersion}-${build}.tar.gz.asc || (echo "Failed to verify the GPG signature of Fulcrum-${fulcrumVersion}-${build}.tar.gz"; exit 1)
|
||||
sudo -u fulcrum gpg --verify Fulcrum-${fulcrumVersion}-${build}.tar.gz.asc || exit 1
|
||||
|
||||
# look for 'OK'
|
||||
sudo -u fulcrum sha256sum -c Fulcrum-${fulcrumVersion}-${build}.tar.gz.sha256sum --ignore-missing || (echo "Failed to verify the sha256 hash of Fulcrum-${fulcrumVersion}-${build}.tar.gz"; exit 1)
|
||||
sudo -u fulcrum sha256sum -c Fulcrum-${fulcrumVersion}-${build}.tar.gz.sha256sum --ignore-missing || exit 1
|
||||
|
||||
# decompress
|
||||
sudo -u fulcrum tar -xvf Fulcrum-${fulcrumVersion}-${build}.tar.gz
|
||||
|
|
|
@ -114,7 +114,7 @@ elif [ "$1" = off ]; then
|
|||
|
||||
elif [ "$1" = update ]; then
|
||||
if [ "$(echo "$@" | grep -c source)" -gt 0 ];then
|
||||
cd /home/bitcoin/lightning/ || (echo " The source is not present"; exit 1)
|
||||
cd /home/bitcoin/lightning/ || exit 1
|
||||
sudo -u bitcoin git pull
|
||||
fi
|
||||
sudo rm -rf /home/bitcoin/cl-plugins-available/cln-grpc
|
||||
|
|
|
@ -156,7 +156,7 @@ function decryptHSMsecret() {
|
|||
/home/admin/config.scripts/cl.hsmtool.sh unlock ${CHAIN}
|
||||
# attempt to decrypt again
|
||||
sudo cat $passwordFile | sudo -u bitcoin lightning-hsmtool decrypt \
|
||||
"$hsmSecretPath" || (echo "# Couldn't decrypt"; exit 1)
|
||||
"$hsmSecretPath" || exit 1
|
||||
fi
|
||||
fi
|
||||
shredPasswordFile
|
||||
|
|
Loading…
Add table
Reference in a new issue