mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-03-01 00:59:23 +01:00
3733 CLN GRPC > JRPC (#3741)
* change exit code * change to cln_jrpc * deactivate the cln_grpc settings
This commit is contained in:
parent
83a6413bb4
commit
e998f19a8c
2 changed files with 15 additions and 14 deletions
|
@ -95,25 +95,26 @@ if [ "$1" = "update-config" ]; then
|
||||||
elif [ "${lightning}" == "cl" ]; then
|
elif [ "${lightning}" == "cl" ]; then
|
||||||
|
|
||||||
echo "# CONFIG Web API Lightning --> CL"
|
echo "# CONFIG Web API Lightning --> CL"
|
||||||
sed -i "s/^ln_node=.*/ln_node=cln_grpc/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
|
||||||
|
|
||||||
# make sure cln-grpc is on
|
# make sure cln-grpc is on
|
||||||
sudo /home/admin/config.scripts/cl-plugin.cln-grpc.sh on mainnet
|
# 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)
|
||||||
hexCa=$(sudo xxd -p -c2000 /home/bitcoin/.lightning/bitcoin/ca.pem)
|
# hexCa=$(sudo xxd -p -c2000 /home/bitcoin/.lightning/bitcoin/ca.pem)
|
||||||
if [ "${hexClient}" == "" ]; then
|
# if [ "${hexClient}" == "" ]; then
|
||||||
echo "# FAIL /home/bitcoin/.lightning/bitcoin/*.pem files maybe missing"
|
# echo "# FAIL /home/bitcoin/.lightning/bitcoin/*.pem files maybe missing"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# update config with hex values
|
# update config with hex values
|
||||||
sed -i "s/^cln_grpc_cert=.*/cln_grpc_cert=${hexClient}/g" ./.env
|
# sed -i "s/^cln_grpc_cert=.*/cln_grpc_cert=${hexClient}/g" ./.env
|
||||||
sed -i "s/^cln_grpc_key=.*/cln_grpc_key=${hexClientKey}/g" ./.env
|
# sed -i "s/^cln_grpc_key=.*/cln_grpc_key=${hexClientKey}/g" ./.env
|
||||||
sed -i "s/^cln_grpc_ca=.*/cln_grpc_ca=${hexCa}/g" ./.env
|
# sed -i "s/^cln_grpc_ca=.*/cln_grpc_ca=${hexCa}/g" ./.env
|
||||||
sed -i "s/^cln_grpc_ip=.*/cln_grpc_ip=127.0.0.1/g" ./.env
|
# sed -i "s/^cln_grpc_ip=.*/cln_grpc_ip=127.0.0.1/g" ./.env
|
||||||
sed -i "s/^cln_grpc_port=.*/cln_grpc_port=4772/g" ./.env
|
# sed -i "s/^cln_grpc_port=.*/cln_grpc_port=4772/g" ./.env
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "# CONFIG Web API Lightning --> OFF"
|
echo "# CONFIG Web API Lightning --> OFF"
|
||||||
|
|
|
@ -118,7 +118,7 @@ if [ "$1" = "install" ]; then
|
||||||
# check if the binary is already installed
|
# check if the binary is already installed
|
||||||
if [ -f /usr/local/bin/lightningd ]; then
|
if [ -f /usr/local/bin/lightningd ]; then
|
||||||
echo "Core Lightning binary already installed - done"
|
echo "Core Lightning binary already installed - done"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# download and verify the source from github
|
# download and verify the source from github
|
||||||
|
|
Loading…
Add table
Reference in a new issue