add CLN lightning-rpc access for blitzapi

This commit is contained in:
openoms 2022-07-23 12:34:33 +01:00
parent 9973e871fd
commit 5da3067c95
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65
2 changed files with 9 additions and 9 deletions

View file

@ -179,6 +179,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "rpc-file-mode=0660" | tee -a ${CLCONF}
fi
/usr/sbin/usermod --append --groups bitcoin blitzapi
# symlink the CLN data dir for blitzapi
sudo rm -rf /home/blitzapi/.lightning # not a symlink.. delete it silently
# create symlink
sudo - u blitzapi ln -s /mnt/hdd/app-data/.lightning /home/blitzapi/
cd /home/blitzapi || exit 1
# git clone https://github.com/fusion44/blitz_api.git /home/blitzapi/blitz_api

View file

@ -67,15 +67,11 @@ if [ $(grep -c "^feeadjuster" < ${CLCONF}) -gt 0 ];then
fi
fi
if [ "${LNBitsFunding}" = "${netprefix}cl" ]; then
# https://github.com/rootzoll/raspiblitz/issues/3007
if [ $(grep -c "^rpc-file-mode=0660" < ${CLCONF}) -eq 0 ]; then
echo "rpc-file-mode=0660" | tee -a ${CLCONF}
fi
fi
if [ "${BTCPayServer}" = "on" ] && [ "${CHAIN}" = "mainnet" ] ; then
# https://github.com/rootzoll/raspiblitz/issues/3007
# https://github.com/rootzoll/raspiblitz/issues/3007
# add for test networks as well if needed on mainnet
if [ "${blitzapi}" = "on" ] || \
[ "${LNBitsFunding}" = "${netprefix}cl" ] || \
[ "${BTCPayServer}" = "on" ]; then
if [ $(grep -c "^rpc-file-mode=0660" < ${CLCONF}) -eq 0 ]; then
echo "rpc-file-mode=0660" | tee -a ${CLCONF}
fi