mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 19:21:57 +02:00
Fatpack: LCD on & cl-plugin.cln-grpc OFF (#3817)
* make sure fatpack is LCD activated * remove cl-plugin.cln-grpc.sh by default * #3793 fix socket jrpc
This commit is contained in:
@@ -440,14 +440,8 @@ if [ "${clNode}" != "${choice}" ]; then
|
|||||||
/home/admin/config.scripts/cl.install.sh on signet
|
/home/admin/config.scripts/cl.install.sh on signet
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure that cln-grpc is on for the WebAPI
|
|
||||||
echo "# install the cln-grpc plugin"
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh on
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "# turning OFF"
|
echo "# turning OFF"
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh off
|
|
||||||
/home/admin/config.scripts/cl.install.sh off mainnet
|
/home/admin/config.scripts/cl.install.sh off mainnet
|
||||||
/home/admin/config.scripts/cl.install.sh off testnet
|
/home/admin/config.scripts/cl.install.sh off testnet
|
||||||
/home/admin/config.scripts/cl.install.sh off signet
|
/home/admin/config.scripts/cl.install.sh off signet
|
||||||
|
@@ -342,10 +342,6 @@ if [ "${lightning}" == "cl" ]; then
|
|||||||
/home/admin/_cache.sh set message "Core Lightning Setup"
|
/home/admin/_cache.sh set message "Core Lightning Setup"
|
||||||
/home/admin/config.scripts/cl.install.sh on mainnet >> ${logFile}
|
/home/admin/config.scripts/cl.install.sh on mainnet >> ${logFile}
|
||||||
|
|
||||||
echo "# switch cln-grpc on" >> ${logFile}
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install >> ${logFile}
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh on >> ${logFile}
|
|
||||||
|
|
||||||
# OLD WALLET FROM CLIGHTNING RESCUE
|
# OLD WALLET FROM CLIGHTNING RESCUE
|
||||||
if [ "${clrescue}" != "" ]; then
|
if [ "${clrescue}" != "" ]; then
|
||||||
|
|
||||||
|
@@ -315,9 +315,6 @@ if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ] || [ "${tcl}" == "on" ] ||
|
|||||||
# if already installed by fatpack will skip
|
# if already installed by fatpack will skip
|
||||||
echo "Provisioning Core Lightning Binary - run config script" >> ${logFile}
|
echo "Provisioning Core Lightning Binary - run config script" >> ${logFile}
|
||||||
/home/admin/config.scripts/cl.install.sh install >> ${logFile} 2>&1
|
/home/admin/config.scripts/cl.install.sh install >> ${logFile} 2>&1
|
||||||
echo "Provisioning cl-plugin.cln-grpc.sh - run config script" >> ${logFile}
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install >> ${logFile}
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh on >> ${logFile}
|
|
||||||
else
|
else
|
||||||
echo "Provisioning Core Lightning Binary - not active" >> ${logFile}
|
echo "Provisioning Core Lightning Binary - not active" >> ${logFile}
|
||||||
fi
|
fi
|
||||||
@@ -346,6 +343,7 @@ else
|
|||||||
echo "Provisioning CL Signet - not active" >> ${logFile}
|
echo "Provisioning CL Signet - not active" >> ${logFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# TOR
|
# TOR
|
||||||
if [ "${runBehindTor}" == "on" ]; then
|
if [ "${runBehindTor}" == "on" ]; then
|
||||||
echo "Provisioning TOR - run config script" >> ${logFile}
|
echo "Provisioning TOR - run config script" >> ${logFile}
|
||||||
|
@@ -9,6 +9,9 @@ if [ "$EUID" -ne 0 ]
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# make sure LCD is on (default for fatpack)
|
||||||
|
/home/admin/config.scripts/blitz.display.sh set-display lcd
|
||||||
|
|
||||||
# check if sd card needs expansion before fatpack
|
# check if sd card needs expansion before fatpack
|
||||||
source <(sudo /home/admin/config.scripts/blitz.bootdrive.sh status)
|
source <(sudo /home/admin/config.scripts/blitz.bootdrive.sh status)
|
||||||
if [ "${needsExpansion}" == "1" ]; then
|
if [ "${needsExpansion}" == "1" ]; then
|
||||||
@@ -71,8 +74,6 @@ echo "* Adding LND ..."
|
|||||||
|
|
||||||
echo "* Adding Core Lightning ..."
|
echo "* Adding Core Lightning ..."
|
||||||
/home/admin/config.scripts/cl.install.sh install || exit 1
|
/home/admin/config.scripts/cl.install.sh install || exit 1
|
||||||
echo "* Adding the cln-grpc plugin ..."
|
|
||||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install || exit 1
|
|
||||||
|
|
||||||
# *** AUTO UPDATE FALLBACK NODE LIST FROM INTERNET (only in fatpack)
|
# *** AUTO UPDATE FALLBACK NODE LIST FROM INTERNET (only in fatpack)
|
||||||
echo "*** FALLBACK NODE LIST ***"
|
echo "*** FALLBACK NODE LIST ***"
|
||||||
|
@@ -123,17 +123,10 @@ if [ "$1" = "update-config" ]; then
|
|||||||
# configure CL
|
# configure CL
|
||||||
elif [ "${lightning}" == "cl" ]; then
|
elif [ "${lightning}" == "cl" ]; then
|
||||||
|
|
||||||
# make sure socket can be accessed by blitzapi
|
|
||||||
echo "# Access Rights Web API Lightning --> CL SOCKET: /mnt/hdd/app-data/.lightning/bitcoin/lightning-rpc"
|
|
||||||
sudo chmod 770 /mnt/hdd/app-data/.lightning/bitcoin/lightning-rpc
|
|
||||||
|
|
||||||
echo "# CONFIG Web API Lightning --> CL"
|
echo "# CONFIG Web API Lightning --> CL"
|
||||||
sed -i "s/^ln_node=.*/ln_node=cln_jrpc/g" ./.env
|
sed -i "s/^ln_node=.*/ln_node=cln_jrpc/g" ./.env
|
||||||
sed -i "s#^cln_jrpc_path=.*#cln_jrpc_path=\"/mnt/hdd/app-data/.lightning/bitcoin/lightning-rpc\"#g" ./.env
|
sed -i "s#^cln_jrpc_path=.*#cln_jrpc_path=\"/mnt/hdd/app-data/.lightning/bitcoin/lightning-rpc\"#g" ./.env
|
||||||
|
|
||||||
# make sure cln-grpc is on
|
|
||||||
# sudo /home/admin/config.scripts/cl-plugin.cln-grpc.sh on mainnet
|
|
||||||
|
|
||||||
# get hex values of pem files
|
# get hex values of pem files
|
||||||
# hexClient=$(sudo xxd -p -c2000 /home/bitcoin/.lightning/bitcoin/client.pem)
|
# hexClient=$(sudo xxd -p -c2000 /home/bitcoin/.lightning/bitcoin/client.pem)
|
||||||
# hexClientKey=$(sudo xxd -p -c2000 /home/bitcoin/.lightning/bitcoin/client-key.pem)
|
# hexClientKey=$(sudo xxd -p -c2000 /home/bitcoin/.lightning/bitcoin/client-key.pem)
|
||||||
|
@@ -6,6 +6,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ];
|
|||||||
echo "# script to check CL states"
|
echo "# script to check CL states"
|
||||||
echo "# cl.check.sh basic-setup"
|
echo "# cl.check.sh basic-setup"
|
||||||
echo "# cl.check.sh prestart [mainnet|testnet|signet]"
|
echo "# cl.check.sh prestart [mainnet|testnet|signet]"
|
||||||
|
echo "# cl.check.sh poststart [mainnet|testnet|signet]"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -17,10 +18,12 @@ source <(/home/admin/config.scripts/network.aliases.sh getvars cl $2)
|
|||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# PRESTART
|
# PRESTART
|
||||||
# is executed by systemd cl services everytime before cl is started
|
# is executed by systemd cl services everytime BEFORE cl is started
|
||||||
# so it tries to make sure the config is in valid shape
|
# so it tries to make sure the config is in valid shape
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
if [ "$1" == "prestart" ]; then
|
||||||
|
|
||||||
# make sure plugins are loaded https://github.com/rootzoll/raspiblitz/issues/2953
|
# make sure plugins are loaded https://github.com/rootzoll/raspiblitz/issues/2953
|
||||||
if [ $(grep -c "^plugin-dir=/home/bitcoin/${netprefix}cl-plugins-enabled" < ${CLCONF}) -eq 0 ];then
|
if [ $(grep -c "^plugin-dir=/home/bitcoin/${netprefix}cl-plugins-enabled" < ${CLCONF}) -eq 0 ];then
|
||||||
echo "plugin-dir=/home/bitcoin/${netprefix}cl-plugins-enabled" | tee -a ${CLCONF}
|
echo "plugin-dir=/home/bitcoin/${netprefix}cl-plugins-enabled" | tee -a ${CLCONF}
|
||||||
@@ -85,3 +88,25 @@ if [ $(grep -c "^grpc-port" < ${CLCONF}) -gt 0 ];then
|
|||||||
rm -rf /home/bitcoin/${netprefix}cl-plugins-enabled/cln-grpc
|
rm -rf /home/bitcoin/${netprefix}cl-plugins-enabled/cln-grpc
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# POSTSTART
|
||||||
|
# is executed by systemd cl services everytime AFTER cl is started
|
||||||
|
# takes care of things that are just available when CL is running
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
if [ "$1" == "poststart" ]; then
|
||||||
|
|
||||||
|
# log info
|
||||||
|
info=$(ls -la /mnt/hdd/app-data/.lightning/bitcoin/lightning-rpc)
|
||||||
|
logger "${info}"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "# Unkonwn Parameter $1 or missing"
|
||||||
|
exit 1
|
||||||
|
@@ -61,9 +61,8 @@ After=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=-/home/admin/config.scripts/cl.check.sh prestart $CHAIN
|
ExecStartPre=-/home/admin/config.scripts/cl.check.sh prestart $CHAIN
|
||||||
ExecStart=/bin/sh -c '${passwordInput}/usr/local/bin/lightningd \\
|
ExecStart=/bin/sh -c '${passwordInput}/usr/local/bin/lightningd --conf=${CLCONF} ${encryptedHSMoption} --pid-file=/run/lightningd/${netprefix}lightningd.pid --rpc-file-mode 0660'
|
||||||
--conf=${CLCONF} ${encryptedHSMoption} \\
|
ExecStartPost=-/home/admin/config.scripts/cl.check.sh poststart $CHAIN
|
||||||
--pid-file=/run/lightningd/${netprefix}lightningd.pid'
|
|
||||||
|
|
||||||
# Creates /run/lightningd owned by bitcoin
|
# Creates /run/lightningd owned by bitcoin
|
||||||
RuntimeDirectory=lightningd
|
RuntimeDirectory=lightningd
|
||||||
|
Reference in New Issue
Block a user