mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-04 12:05:04 +02:00
lnd.setname.sh for testnet
This commit is contained in:
@@ -10,6 +10,9 @@ fi
|
|||||||
# 1. parameter [?newName]
|
# 1. parameter [?newName]
|
||||||
newName=$1
|
newName=$1
|
||||||
|
|
||||||
|
# use default values from the raspiblitz.conf
|
||||||
|
source <(/home/admin/config.scripts/network.aliases.sh getvars)
|
||||||
|
|
||||||
# run interactive if 'turn on' && no further parameters
|
# run interactive if 'turn on' && no further parameters
|
||||||
if [ ${#newName} -eq 0 ]; then
|
if [ ${#newName} -eq 0 ]; then
|
||||||
|
|
||||||
@@ -28,7 +31,7 @@ fi
|
|||||||
blitzConfig="/mnt/hdd/raspiblitz.conf"
|
blitzConfig="/mnt/hdd/raspiblitz.conf"
|
||||||
|
|
||||||
# lnd conf file
|
# lnd conf file
|
||||||
lndConfig="/mnt/hdd/lnd/lnd.conf"
|
lndConfig="/mnt/hdd/lnd/${netprefix}lnd.conf"
|
||||||
|
|
||||||
# check if raspibblitz config file exists
|
# check if raspibblitz config file exists
|
||||||
configExists=$(ls ${blitzConfig} | grep -c '.conf')
|
configExists=$(ls ${blitzConfig} | grep -c '.conf')
|
||||||
@@ -64,7 +67,7 @@ fi
|
|||||||
|
|
||||||
# stop services
|
# stop services
|
||||||
echo "making sure services are not running"
|
echo "making sure services are not running"
|
||||||
sudo systemctl stop lnd 2>/dev/null
|
sudo systemctl stop ${netprefix}lnd 2>/dev/null
|
||||||
|
|
||||||
# lnd.conf: change name
|
# lnd.conf: change name
|
||||||
sudo sed -i "s/^alias=.*/alias=${newName}/g" ${lndConfig}
|
sudo sed -i "s/^alias=.*/alias=${newName}/g" ${lndConfig}
|
||||||
|
Reference in New Issue
Block a user