lnd & cl install on on if not done in fatpack

This commit is contained in:
rootzoll 2021-12-17 21:43:19 +01:00
parent 300090047c
commit adc8549845
3 changed files with 61 additions and 37 deletions

View File

@ -652,21 +652,21 @@ echo
# LND #
#######
echo
#if [ "${fatpack}" == "true" ]; then
if [ "${fatpack}" == "true" ]; then
/home/admin/config.scripts/lnd.install.sh install || exit 1
#else
# echo -e "\nSkipping LND install - let user install later if needed ..."
#fi
else
echo -e "\nSkipping LND install - let user install later if needed ..."
fi
###############
# C-LIGHTNING #
###############
echo
#if [ "${fatpack}" == "true" ]; then
if [ "${fatpack}" == "true" ]; then
/home/admin/config.scripts/cl.install.sh install || exit 1
#else
# echo -e "\nSkipping c-lightning install - let user install later if needed ..."
#fi
else
echo -e "\nSkipping c-lightning install - let user install later if needed ..."
fi
echo
echo "*** raspiblitz.info ***"

View File

@ -8,6 +8,15 @@ CLVERSION=v0.10.2
# https://github.com/ElementsProject/lightning/commit/master
# CLVERSION="063366ed7e3b7cc12a8d1681acc2b639cf07fa23"
# https://github.com/ElementsProject/lightning/tree/master/contrib/keys
# PGPsigner="rustyrussel"
# PGPpkeys="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/rustyrussell.txt"
# PGPcheck="D9200E6CD1ADB8F1"
PGPsigner="cdecker"
PGPpkeys="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/cdecker.txt"
PGPcheck="A26D6D9FE088ED58"
# help
if [ $# -eq 0 ]||[ "$1" = "-h" ]||[ "$1" = "--help" ];then
echo
@ -26,16 +35,16 @@ if [ $# -eq 0 ]||[ "$1" = "-h" ]||[ "$1" = "--help" ];then
fi
if [ "$1" = "install" ]; then
echo "*** PREPARING C-LIGHTNING ***"
# https://github.com/ElementsProject/lightning/tree/master/contrib/keys
# PGPsigner="rustyrussel"
# PGPpkeys="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/rustyrussell.txt"
# PGPcheck="D9200E6CD1ADB8F1"
echo "# *** INSTALL C-LIGHTNING ${CLVERSION} BINARY ***"
echo "# only binary install to system"
echo "# no configuration, no systemd service"
PGPsigner="cdecker"
PGPpkeys="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/cdecker.txt"
PGPcheck="A26D6D9FE088ED58"
# check if lnd binary is already installed
if [ $(sudo -u admin lightningd 2>/dev/null --version | grep -c ".") -gt 0 ]; then
echo "c-lightning binary already installed - done"
exit 1
fi
# prepare download dir
sudo rm -rf /home/admin/download/cl
@ -159,6 +168,9 @@ if [ "$1" = on ]||[ "$1" = update ]||[ "$1" = testPR ];then
exit 1
fi
# make sure binary is installed (will skip if already done)
/home/admin/config.scripts/cl.install.sh install
if [ ! -f /usr/local/bin/lightningd ]||[ "$1" = "update" ]||[ "$1" = "testPR" ];then
########################

View File

@ -1,5 +1,26 @@
#!/bin/bash
# "*** LND ***"
## based on https://raspibolt.github.io/raspibolt/raspibolt_40_lnd.html#lightning-lnd
## see LND releases: https://github.com/lightningnetwork/lnd/releases
## !!!! If you change here - make sure to also change interims version in lnd.update.sh !!!
lndVersion="0.14.1-beta"
# olaoluwa
# PGPauthor="roasbeef"
# PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
# PGPcheck="E4D85299674B2D31FAA1892E372CBD7633C61696"
# guggero
PGPauthor="guggero"
PGPpkeys="https://keybase.io/guggero/pgp_keys.asc"
PGPcheck="F4FC70F07310028424EFC20A8E4256593F177720"
# bitconner
#PGPauthor="bitconner"
#PGPpkeys="https://keybase.io/bitconner/pgp_keys.asc"
#PGPcheck="9C8D61868A7C492003B2744EE7D737B67FA592C7"
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ];then
echo
@ -18,28 +39,16 @@ if [ "${network}" == "" ]; then
fi
if [ "$1" = "install" ] ; then
echo "*** PREPARING LND ***"
# "*** LND ***"
## based on https://raspibolt.github.io/raspibolt/raspibolt_40_lnd.html#lightning-lnd
## see LND releases: https://github.com/lightningnetwork/lnd/releases
## !!!! If you change here - make sure to also change interims version in lnd.update.sh !!!
lndVersion="0.14.1-beta"
# olaoluwa
# PGPauthor="roasbeef"
# PGPpkeys="https://keybase.io/roasbeef/pgp_keys.asc"
# PGPcheck="E4D85299674B2D31FAA1892E372CBD7633C61696"
echo "# *** INSTALL LND ${lndVersion} BINARY ***"
echo "# only binary install to system"
echo "# no configuration, no systemd service"
# guggero
PGPauthor="guggero"
PGPpkeys="https://keybase.io/guggero/pgp_keys.asc"
PGPcheck="F4FC70F07310028424EFC20A8E4256593F177720"
# bitconner
#PGPauthor="bitconner"
#PGPpkeys="https://keybase.io/bitconner/pgp_keys.asc"
#PGPcheck="9C8D61868A7C492003B2744EE7D737B67FA592C7"
# check if lnd binary is already installed
if [ $(sudo -u admin lnd --version 2>/dev/null| grep -c 'lnd') -gt 0 ]; then
echo "lnd binary already installed - done"
exit 1
fi
# get LND resources
cd /home/admin/download || exit 1
@ -213,6 +222,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "# OK will init wallet if not exists (may ask for passwordc)"
fi
# make sure binary is installed (will skip if already done)
/home/admin/config.scripts/lnd.install.sh install
sudo ufw allow ${portprefix}9735 comment "${netprefix}lnd"
sudo ufw allow ${portprefix}8080 comment "${netprefix}lnd REST"
sudo ufw allow 1${rpcportmod}009 comment "${netprefix}lnd RPC"
@ -442,4 +454,4 @@ fi
echo "# FAIL - Unknown Parameter $1"
echo "# may need reboot to run"
exit 1
exit 1