mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
fix sed expression
This commit is contained in:
parent
6111ea3d6e
commit
fc399cff81
3 changed files with 4 additions and 15 deletions
|
@ -171,16 +171,6 @@ if [ "${lightning}" == "lnd" ]; then
|
|||
configExists=$(sudo ls /mnt/hdd/lnd/lnd.conf | grep -c '.conf')
|
||||
if [ ${configExists} -eq 1 ]; then
|
||||
|
||||
# remove RPC user & pass from lnd.conf ... since v1.7
|
||||
# https://github.com/rootzoll/raspiblitz/issues/2160
|
||||
echo "- #2160 lnd.conf --> make sure contains no RPC user/pass for bitcoind" >> ${logFile}
|
||||
sudo sed -i '/^\[Bitcoind\]/d' /mnt/hdd/lnd/lnd.conf
|
||||
sudo sed -i '/^bitcoind.rpchost=/d' /mnt/hdd/lnd/lnd.conf
|
||||
sudo sed -i '/^bitcoind.rpcpass=/d' /mnt/hdd/lnd/lnd.conf
|
||||
sudo sed -i '/^bitcoind.rpcuser=/d' /mnt/hdd/lnd/lnd.conf
|
||||
sudo sed -i '/^bitcoind.zmqpubrawblock=/d' /mnt/hdd/lnd/lnd.conf
|
||||
sudo sed -i '/^bitcoind.zmqpubrawtx=/d' /mnt/hdd/lnd/lnd.conf
|
||||
|
||||
# make sure additional values are added to [Application Options] since v1.7
|
||||
echo "- lnd.conf --> checking additional [Application Options] since v1.7" >> ${logFile}
|
||||
applicationOptionsLineNumber=$(sudo grep -n "\[Application Options\]" /mnt/hdd/lnd/lnd.conf | cut -d ":" -f1)
|
||||
|
|
|
@ -56,15 +56,14 @@ source /home/admin/raspiblitz.info
|
|||
if ! grep -Eq "^${netprefix}lnd=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "${netprefix}lnd=off" >> /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# switch on
|
||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
|
||||
RPCUSER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-)
|
||||
RPCPSW=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
||||
RPCPSW=$(sudo cat /mnt/hdd/${nesudo twork}/${network}.conf | grep rpcpassword | cut -c 13-)
|
||||
|
||||
echo "# Check mainnet lnd.conf"
|
||||
# it does not pick up main.zmqpubraw entries from bitcoin.conf, need to set manually
|
||||
|
|
|
@ -83,7 +83,7 @@ if [ "$1" == "prestart" ]; then
|
|||
|
||||
# CHECK zmqpubrawtx
|
||||
setting="zmqpubrawtx"
|
||||
value="tcp://127.0.0.1:${zmqprefix}333"
|
||||
value="tcp\:\/\/127\.0\.0\.1\:${zmqprefix}333"
|
||||
settingExists=$(sudo cat ${lndConfFile} | grep -c "^${network}d.${setting}=")
|
||||
echo "# ${network}d.${setting} exists->(${settingExists})"
|
||||
if [ "${settingExists}" == "0" ]; then
|
||||
|
@ -91,7 +91,7 @@ if [ "$1" == "prestart" ]; then
|
|||
sudo sed -i "${insertLine}i${network}d.zmqpubrawtx=" ${lndConfFile}
|
||||
fi
|
||||
echo "# updating setting (${setting}) with value(${value})"
|
||||
sudo sed -i "s/^${network}d.${setting}=.*/${network}d.${setting}='${value}'/g" ${lndConfFile}
|
||||
sudo sed -i "s/^${network}d\.zmqpubrawtx=.*/${network}d\.zmqpubrawtx=\'${value}\'/g" ${lndConfFile}
|
||||
|
||||
# remove RPC user & pass from lnd.conf ... since v1.7
|
||||
# https://github.com/rootzoll/raspiblitz/issues/2160
|
||||
|
|
Loading…
Add table
Reference in a new issue