mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 02:22:24 +01:00
use raspiblitz.conf
This commit is contained in:
@@ -8,7 +8,6 @@ if [ ${bootstrapInfoExists} -eq 1 ]; then
|
|||||||
# load the data from the info file
|
# load the data from the info file
|
||||||
source ${infoFile}
|
source ${infoFile}
|
||||||
echo "Found raspiblitz.info from bootstrap - processing ..."
|
echo "Found raspiblitz.info from bootstrap - processing ..."
|
||||||
sleep 2
|
|
||||||
|
|
||||||
# if pre-sync is running - stop it
|
# if pre-sync is running - stop it
|
||||||
if [ "${state}" = "presync" ]; then
|
if [ "${state}" = "presync" ]; then
|
||||||
@@ -51,19 +50,37 @@ MENU="Choose one of the following options:"
|
|||||||
OPTIONS=()
|
OPTIONS=()
|
||||||
|
|
||||||
## get basic info (its OK if not set yet)
|
## get basic info (its OK if not set yet)
|
||||||
|
source /mnt/hdd/raspiblitz.conf
|
||||||
|
|
||||||
# get name
|
# check hostname and get backup if from old config
|
||||||
name=`sudo cat /home/admin/.hostname`
|
if [ ${#hostname} -eq 0 ]; then
|
||||||
|
echo "backup info: hostname"
|
||||||
|
hostname=`sudo cat /home/admin/.hostname`
|
||||||
|
if [ ${#hostname} -eq 0 ]; then
|
||||||
|
hostname="raspiblitz"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# get network
|
# check network and get backup if from old config
|
||||||
|
if [ ${#network} -eq 0 ]; then
|
||||||
|
echo "backup info: network"
|
||||||
|
network="bitcoin"
|
||||||
|
litecoinActive=$(sudo ls /mnt/hdd/litecoin/litecoin.conf | grep -c 'litecoin.conf')
|
||||||
|
if [ ${litecoinActive} -eq 1 ]; then
|
||||||
|
network="litecoin"
|
||||||
|
fi
|
||||||
network=`sudo cat /home/admin/.network`
|
network=`sudo cat /home/admin/.network`
|
||||||
|
fi
|
||||||
|
|
||||||
# get chain
|
# check chain and get backup if from system
|
||||||
|
if [ ${#chain} -eq 0 ]; then
|
||||||
|
echo "backup info: chain"
|
||||||
chain="test"
|
chain="test"
|
||||||
isMainChain=$(sudo cat /mnt/hdd/${network}/${network}.conf 2>/dev/null | grep "#testnet=1" -c)
|
isMainChain=$(sudo cat /mnt/hdd/${network}/${network}.conf 2>/dev/null | grep "#testnet=1" -c)
|
||||||
if [ ${isMainChain} -gt 0 ];then
|
if [ ${isMainChain} -gt 0 ];then
|
||||||
chain="main"
|
chain="main"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# check if RTL web interface is installed
|
# check if RTL web interface is installed
|
||||||
runningRTL=$(sudo ls /etc/systemd/system/RTL.service 2>/dev/null | grep -c 'RTL.service')
|
runningRTL=$(sudo ls /etc/systemd/system/RTL.service 2>/dev/null | grep -c 'RTL.service')
|
||||||
@@ -119,7 +136,7 @@ elif [ ${setupState} -lt 100 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# continue setup
|
# continue setup
|
||||||
BACKTITLE="${name} / ${network} / ${chain}"
|
BACKTITLE="${hostname} / ${network} / ${chain}"
|
||||||
TITLE="⚡ Welcome to your RaspiBlitz ⚡"
|
TITLE="⚡ Welcome to your RaspiBlitz ⚡"
|
||||||
MENU="\nThe setup process is not finished yet: \n "
|
MENU="\nThe setup process is not finished yet: \n "
|
||||||
OPTIONS+=(CONTINUE "Continue Setup of your RaspiBlitz")
|
OPTIONS+=(CONTINUE "Continue Setup of your RaspiBlitz")
|
||||||
@@ -132,7 +149,7 @@ else
|
|||||||
|
|
||||||
# MAIN MENU AFTER SETUP
|
# MAIN MENU AFTER SETUP
|
||||||
|
|
||||||
BACKTITLE="${name} / ${network} / ${chain}"
|
BACKTITLE="${hostname} / ${network} / ${chain}"
|
||||||
|
|
||||||
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
|
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
|
||||||
if [ ${locked} -gt 0 ]; then
|
if [ ${locked} -gt 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user