mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 13:02:35 +02:00
web.api: fix sed syntax and format (#3749)
This commit is contained in:
@@ -33,7 +33,7 @@ if [ "$1" = "update-config" ]; then
|
||||
fi
|
||||
|
||||
# prepare config update
|
||||
cd /home/blitzapi/blitz_api
|
||||
cd /home/blitzapi/blitz_api || exit 1
|
||||
secret=$(cat ./.env 2>/dev/null | grep "secret=" | cut -d "=" -f2)
|
||||
cp ./.env_sample ./.env
|
||||
dateStr=$(date)
|
||||
@@ -96,7 +96,7 @@ if [ "$1" = "update-config" ]; then
|
||||
|
||||
echo "# CONFIG Web API Lightning --> CL"
|
||||
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
|
||||
@@ -330,7 +330,7 @@ if [ "$1" = "update-code" ]; then
|
||||
echo "# Update Web API CODE"
|
||||
systemctl stop blitzapi
|
||||
sudo chown -R blitzapi:blitzapi /home/blitzapi/blitz_api
|
||||
cd /home/blitzapi/blitz_api
|
||||
cd /home/blitzapi/blitz_api || exit 1
|
||||
if [ "$currentBranch" == "" ]; then
|
||||
currentBranch=$(sudo -u blitzapi git rev-parse --abbrev-ref HEAD)
|
||||
fi
|
||||
|
Reference in New Issue
Block a user