mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-23 18:02:13 +02:00
committed by
rootzoll
parent
cae65b0d88
commit
7126b57afd
@@ -7,6 +7,12 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# set version of LND manage to install
|
||||||
|
# https://github.com/bitromortac/lndmanage/releases
|
||||||
|
lndmanageVersion="0.11.0"
|
||||||
|
pgpKeyDownload="https://github.com/bitromortac.gpg"
|
||||||
|
gpgFingerprint="0453B9F5071261A40FDB34181965063FC13BEBE2"
|
||||||
|
|
||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
|
|
||||||
# add default value to raspi config if needed
|
# add default value to raspi config if needed
|
||||||
@@ -35,37 +41,65 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** INSTALL LNDMANAGE ***"
|
echo "*** INSTALL LNDMANAGE ***"
|
||||||
|
|
||||||
|
# make sure needed os dependencies are installed
|
||||||
|
sudo apt-get install -y libatlas-base-dev
|
||||||
|
|
||||||
|
# prepare directory
|
||||||
mkdir /home/admin/lndmanage 2>/dev/null
|
mkdir /home/admin/lndmanage 2>/dev/null
|
||||||
sudo chown admin:admin /home/admin/lndmanage
|
sudo chown admin:admin /home/admin/lndmanage
|
||||||
cd /home/admin/lndmanage
|
|
||||||
|
|
||||||
# activate virtual environment
|
echo "# downloading files ..."
|
||||||
|
cd /home/admin/lndmanage
|
||||||
|
sudo -u admin wget -N https://github.com/bitromortac/lndmanage/releases/download/v${lndmanageVersion}/lndmanage-${lndmanageVersion}-py3-none-any.whl
|
||||||
|
sudo -u admin wget -N https://github.com/bitromortac/lndmanage/releases/download/v${lndmanageVersion}/lndmanage-${lndmanageVersion}-py3-none-any.whl.asc
|
||||||
|
sudo -u admin wget -N ${pgpKeyDownload} -O sigingkey.gpg
|
||||||
|
|
||||||
|
echo "# checking signing keys ..."
|
||||||
|
gpg --import sigingkey.gpg
|
||||||
|
verifyResult=$(gpg --verify lndmanage-${lndmanageVersion}-py3-none-any.whl.asc 2>&1)
|
||||||
|
goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c)
|
||||||
|
correctKey=$(echo ${verifyResult} | tr -d " \t\n\r" | grep "${gpgFingerprint}" -c)
|
||||||
|
echo "goodSignature='${goodSignature}'"
|
||||||
|
echo "correctKey='${correctKey}'"
|
||||||
|
if [ ${goodSignature} -gt 0 ] && [ ${correctKey} -gt 0 ]; then
|
||||||
|
echo "# OK signature is valid"
|
||||||
|
else
|
||||||
|
echo "error='unvalid signature'"
|
||||||
|
sudo rm -rf /home/admin/lndmanage
|
||||||
|
sleep 5
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "# installing ..."
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
source /home/admin/lndmanage/venv/bin/activate
|
source /home/admin/lndmanage/venv/bin/activate
|
||||||
|
python3 -m pip install lndmanage-0.11.0-py3-none-any.whl
|
||||||
|
|
||||||
# get build dependencies
|
# get build dependencies
|
||||||
python3 -m pip install --upgrade pip wheel setuptools
|
# python3 -m pip install --upgrade pip wheel setuptools
|
||||||
|
|
||||||
# install lndmanage
|
# install lndmanage
|
||||||
python3 -m pip install lndmanage==0.11.0
|
# python3 -m pip install lndmanage==0.11.0
|
||||||
|
|
||||||
# check if install was successfull
|
# check if install was successfull
|
||||||
if [ $(python3 -m pip list | grep -c "lndmanage") -eq 0 ]; then
|
if [ $(python3 -m pip list | grep -c "lndmanage") -eq 0 ]; then
|
||||||
echo
|
echo
|
||||||
echo "#!! FAIL --> Was not able to install LNDMANAGE"
|
echo "#!! FAIL --> Was not able to install LNDMANAGE"
|
||||||
echo "#!! Maybe because of internet network issues - try again later."
|
echo "#!! Maybe because of internet network issues - try again later."
|
||||||
sleep 9
|
sudo rm -rf /home/admin/lndmanage
|
||||||
|
sleep 5
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# setting value in raspi blitz config
|
# setting value in raspi blitz config
|
||||||
sudo sed -i "s/^lndmanage=.*/lndmanage=on/g" /mnt/hdd/raspiblitz.conf
|
sudo sed -i "s/^lndmanage=.*/lndmanage=on/g" /mnt/hdd/raspiblitz.conf
|
||||||
|
echo "#######################################################################"
|
||||||
echo "# usage: https://github.com/bitromortac/lndmanage/blob/master/README.md"
|
echo "# OK install done"
|
||||||
echo "# usage: lndmanage --help"
|
echo "#######################################################################"
|
||||||
echo "# To start type: 'manage' in the command line."
|
echo "# To start type: 'manage' in the command line."
|
||||||
echo "# To exit the venv - type 'deactivate' and press ENTER"
|
echo "# To exit the venv - type 'deactivate' and press ENTER"
|
||||||
|
echo "# usage: https://github.com/bitromortac/lndmanage/blob/master/README.md"
|
||||||
|
echo "# usage: lndmanage --help"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user