mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-09-23 01:10:03 +00:00
lncli: enable bash-completion (#605)
* lncli: enable bash-completion during LND upgrade * lncli: enable bash-completion in setup_device.sh
This commit is contained in:
parent
c2c1e8a81d
commit
466a1a73bc
|
@ -316,6 +316,7 @@ if [ $IS_RASPI4_ARM64 = 1 ]; then
|
|||
LND_ARCH="lnd-linux-arm64"
|
||||
fi
|
||||
LND_UPGRADE_URL=https://github.com/lightningnetwork/lnd/releases/download/$LND_VERSION/$LND_ARCH-$LND_VERSION.tar.gz
|
||||
LNCLI_COMPLETION_URL=https://raw.githubusercontent.com/lightningnetwork/lnd/$LND_VERSION/contrib/lncli.bash-completion
|
||||
CURRENT=""
|
||||
if [ -f $LND_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $LND_VERSION_FILE)
|
||||
|
@ -342,6 +343,10 @@ if [ "$CURRENT" != "$LND_VERSION" ]; then
|
|||
else
|
||||
echo "ERROR UPGRADING LND - GPG FAILED"
|
||||
fi
|
||||
|
||||
# Download bash-completion file for lncli
|
||||
wget $LNCLI_COMPLETION_URL
|
||||
sudo cp lncli.bash-completion /etc/bash_completion.d/lncli
|
||||
fi
|
||||
|
||||
# Upgrade Loop
|
||||
|
|
|
@ -371,6 +371,8 @@ if [ $IS_RASPI4_ARM64 = 1 ]; then
|
|||
LND_ARCH="lnd-linux-arm64"
|
||||
fi
|
||||
LND_UPGRADE_URL=https://github.com/lightningnetwork/lnd/releases/download/$LND_VERSION/$LND_ARCH-$LND_VERSION.tar.gz
|
||||
LNCLI_COMPLETION_URL=https://raw.githubusercontent.com/lightningnetwork/lnd/$LND_VERSION/contrib/lncli.bash-completion
|
||||
|
||||
CURRENT=""
|
||||
if [ -f $LND_VERSION_FILE ]; then
|
||||
CURRENT=$(cat $LND_VERSION_FILE)
|
||||
|
@ -392,6 +394,10 @@ if [ "$CURRENT" != "$LND_VERSION" ]; then
|
|||
ln -s /bin/ip /usr/bin/ip || true
|
||||
|
||||
echo $LND_VERSION > $LND_VERSION_FILE
|
||||
|
||||
# Download bash-completion file for lncli
|
||||
wget $LNCLI_COMPLETION_URL
|
||||
sudo cp lncli.bash-completion /etc/bash_completion.d/lncli
|
||||
fi
|
||||
cd ~
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user