Add poold binary; Add pgp key for new lnd upgrades

This commit is contained in:
Taylor Helsper 2020-11-08 16:23:01 -06:00
parent 08fbc6f4bb
commit 90917bd7f1
3 changed files with 81 additions and 1 deletions

View File

@ -58,6 +58,7 @@ fi
# Import Keys
set +e
curl https://keybase.io/roasbeef/pgp_keys.asc | gpg --import
curl https://keybase.io/bitconner/pgp_keys.asc | gpg --import
curl https://raw.githubusercontent.com/JoinMarket-Org/joinmarket-clientserver/master/pubkeys/AdamGibson.asc | gpg --import
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 01EA5486DE18A882D4C2684590C8019E36C2E964
curl https://keybase.io/suheb/pgp_keys.asc | gpg --import
@ -280,7 +281,44 @@ if [ "$CURRENT" != "$LOOP_VERSION" ]; then
# Mark current version
echo $LOOP_VERSION > $LOOP_VERSION_FILE
else
echo "ERROR UPGRADING LND - GPG FAILED"
echo "ERROR UPGRADING LOOP - GPG FAILED"
fi
fi
# Upgrade Pool
echo "Upgrading pool..."
POOL_ARCH="pool-linux-armv7"
if [ $IS_X86 = 1 ]; then
POOL_ARCH="pool-linux-amd64"
fi
POOL_UPGRADE_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/$POOL_ARCH-$POOL_VERSION.tar.gz
POOL_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/manifest-$POOL_VERSION.txt
POOL_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/manifest-$POOL_VERSION.txt.sig
CURRENT=""
if [ -f $POOL_VERSION_FILE ]; then
CURRENT=$(cat $POOL_VERSION_FILE)
fi
if [ "$CURRENT" != "$POOL_VERSION" ]; then
# Download and install pool
rm -rf /opt/download
mkdir -p /opt/download
cd /opt/download
wget $POOL_UPGRADE_URL
wget $POOL_UPGRADE_MANIFEST_URL
wget $POOL_UPGRADE_MANIFEST_SIG_URL
gpg --verify manifest-*.txt.sig
if [ $? == 0 ]; then
# Install Pool
tar -xzf pool-*.tar.gz
mv $POOL_ARCH-$POOL_VERSION pool
install -m 0755 -o root -g root -t /usr/local/bin pool/*
# Mark current version
echo $POOL_VERSION > $POOL_VERSION_FILE
else
echo "ERROR UPGRADING POOL - GPG FAILED"
fi
fi

View File

@ -12,6 +12,10 @@ LOOP_VERSION="v0.11.0-beta"
LOOP_VERSION_FILE=/home/bitcoin/.mynode/loop_version
LOOP_LATEST_VERSION_FILE=/home/bitcoin/.mynode/loop_version_latest
POOL_VERSION="v0.3.2-alpha"
POOL_VERSION_FILE=/home/bitcoin/.mynode/pool_version
POOL_LATEST_VERSION_FILE=/home/bitcoin/.mynode/pool_version_latest
LNDHUB_VERSION="v1.2.0"
LNDHUB_VERSION_FILE=/home/bitcoin/.mynode/lndhub_version
LNDHUB_LATEST_VERSION_FILE=/home/bitcoin/.mynode/lndhub_version_latest

View File

@ -107,6 +107,7 @@ fi
# Import Keys
curl https://keybase.io/roasbeef/pgp_keys.asc | gpg --import
curl https://keybase.io/bitconner/pgp_keys.asc | gpg --import
curl https://raw.githubusercontent.com/JoinMarket-Org/joinmarket-clientserver/master/pubkeys/AdamGibson.asc | gpg --import
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 01EA5486DE18A882D4C2684590C8019E36C2E964
curl https://keybase.io/suheb/pgp_keys.asc | gpg --import
@ -371,6 +372,43 @@ if [ "$CURRENT" != "$LOOP_VERSION" ]; then
fi
fi
# Install Pool
echo "Installing pool..."
POOL_ARCH="pool-linux-armv7"
if [ $IS_X86 = 1 ]; then
POOL_ARCH="pool-linux-amd64"
fi
POOL_UPGRADE_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/$POOL_ARCH-$POOL_VERSION.tar.gz
POOL_UPGRADE_MANIFEST_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/manifest-$POOL_VERSION.txt
POOL_UPGRADE_MANIFEST_SIG_URL=https://github.com/lightninglabs/pool/releases/download/$POOL_VERSION/manifest-$POOL_VERSION.txt.sig
CURRENT=""
if [ -f $POOL_VERSION_FILE ]; then
CURRENT=$(cat $POOL_VERSION_FILE)
fi
if [ "$CURRENT" != "$POOL_VERSION" ]; then
# Download and install pool
rm -rf /opt/download
mkdir -p /opt/download
cd /opt/download
wget $POOL_UPGRADE_URL
wget $POOL_UPGRADE_MANIFEST_URL
wget $POOL_UPGRADE_MANIFEST_SIG_URL
gpg --verify manifest-*.txt.sig
if [ $? == 0 ]; then
# Install Pool
tar -xzf pool-*.tar.gz
mv $POOL_ARCH-$POOL_VERSION pool
install -m 0755 -o root -g root -t /usr/local/bin pool/*
# Mark current version
echo $POOL_VERSION > $POOL_VERSION_FILE
else
echo "ERROR UPGRADING POOL - GPG FAILED"
fi
fi
# Setup "install" location for some apps
mkdir -p /opt/mynode