mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 06:48:00 +01:00
deactivate litecoin & add debug
This commit is contained in:
parent
d21a79372b
commit
588748f710
3 changed files with 28 additions and 14 deletions
|
@ -455,9 +455,14 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
echo "hddBlocksLitecoin=${hddBlocksLitecoin}" >> ${infoFile}
|
echo "hddBlocksLitecoin=${hddBlocksLitecoin}" >> ${infoFile}
|
||||||
echo "hddGotMigrationData=${hddGotMigrationData}" >> ${infoFile}
|
echo "hddGotMigrationData=${hddGotMigrationData}" >> ${infoFile}
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "HDD is there but not AutoMounted yet - Waiting for user Setup/Update" >> $logFile
|
echo "HDD is there but not AutoMounted yet - Waiting for user Setup/Update" >> $logFile
|
||||||
|
|
||||||
|
# add some debug info to logfile
|
||||||
|
echo "# df " >> ${logFile}
|
||||||
|
df >> ${logFile}
|
||||||
|
echo "# lsblk -o NAME,FSTYPE,LABEL " >> ${logFile}
|
||||||
|
lsblk -o NAME,FSTYPE,LABEL >> ${logFile}
|
||||||
|
|
||||||
# determine correct setup phase
|
# determine correct setup phase
|
||||||
infoMessage="Please Login for Setup"
|
infoMessage="Please Login for Setup"
|
||||||
setupPhase="setup"
|
setupPhase="setup"
|
||||||
|
@ -468,7 +473,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
|
|
||||||
# INIT OLD SSH HOST KEYS on Update/Recovery to prevent "Unknown Host" on ssh client
|
# INIT OLD SSH HOST KEYS on Update/Recovery to prevent "Unknown Host" on ssh client
|
||||||
echo "COPY und Activating old SSH host keys" >> $logFile
|
echo "COPY und Activating old SSH host keys" >> $logFile
|
||||||
sudo /home/admin/config.scripts/blitz.ssh.sh restore >> $logFile
|
/home/admin/config.scripts/blitz.ssh.sh restore >> $logFile
|
||||||
|
|
||||||
# determine if this is a recovery or an update
|
# determine if this is a recovery or an update
|
||||||
# TODO: improve version/update detection later
|
# TODO: improve version/update detection later
|
||||||
|
@ -494,14 +499,14 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
# until SSH or WEBUI setup data is available
|
# until SSH or WEBUI setup data is available
|
||||||
#############################################
|
#############################################
|
||||||
|
|
||||||
echo "## WAIT LOOP: USER SETUP/UPDATE/MIGRATION" >> $logFile
|
echo "## WAIT LOOP: USER SETUP/UPDATE/MIGRATION" >> ${logFile}
|
||||||
until [ "${state}" == "waitprovision" ]
|
until [ "${state}" == "waitprovision" ]
|
||||||
do
|
do
|
||||||
|
|
||||||
# get fresh info about data drive (in case the hdd gets disconnected)
|
# get fresh info about data drive (in case the hdd gets disconnected)
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||||
if [ "${hddCandidate}" == "" ]; then
|
if [ "${hddCandidate}" == "" ]; then
|
||||||
echo "!!! WARNING !!! Lost HDD connection .. triggering reboot, to restart system-init." >> $logFile
|
echo "!!! WARNING !!! Lost HDD connection .. triggering reboot, to restart system-init." >> ${logFile}
|
||||||
sed -i "s/^state=.*/state=errorHDD/g" ${infoFile}
|
sed -i "s/^state=.*/state=errorHDD/g" ${infoFile}
|
||||||
sed -i "s/^message=.*/message='lost HDD - rebooting'/g" ${infoFile}
|
sed -i "s/^message=.*/message='lost HDD - rebooting'/g" ${infoFile}
|
||||||
sudo cp ${logFile} ${logFile}.error
|
sudo cp ${logFile} ${logFile}.error
|
||||||
|
@ -537,20 +542,20 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
|
|
||||||
# refresh data from info file
|
# refresh data from info file
|
||||||
source ${infoFile}
|
source ${infoFile}
|
||||||
echo "# PROVISION PROCESS with setupPhase(${setupPhase})" >> $logFile
|
echo "# PROVISION PROCESS with setupPhase(${setupPhase})" >> ${logFile}
|
||||||
|
|
||||||
# mark system on sd card as in setup process
|
# mark system on sd card as in setup process
|
||||||
echo "the provision process was started but did not finish yet" > /home/admin/provision.flag
|
echo "the provision process was started but did not finish yet" > /home/admin/provision.flag
|
||||||
|
|
||||||
# make HDD is still temp mounted
|
# make sure HDD is mounted (could be freshly formatted by user on last loop)
|
||||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||||
echo "Temp mounting (2) data drive ($hddCandidate)" >> $logFile
|
echo "Temp mounting (2) data drive ($hddCandidate)" >> ${logFile}
|
||||||
if [ "${hddFormat}" != "btrfs" ]; then
|
if [ "${hddFormat}" != "btrfs" ]; then
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddPartitionCandidate})
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddPartitionCandidate})
|
||||||
else
|
else
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddCandidate})
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount ${hddCandidate})
|
||||||
fi
|
fi
|
||||||
echo "Temp mounting (2) result: ${isMounted}" >> $logFile
|
echo "Temp mounting (2) result: ${isMounted}" >> ${logFile}
|
||||||
|
|
||||||
# check that HDD was temp mounted
|
# check that HDD was temp mounted
|
||||||
if [ "${isMounted}" != "1"]; then
|
if [ "${isMounted}" != "1"]; then
|
||||||
|
@ -560,7 +565,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure all links between directories/drives are correct
|
# make sure all links between directories/drives are correct
|
||||||
echo "Refreshing links between directories/drives .." >> $logFile
|
echo "Refreshing links between directories/drives .." >> ${logFile}
|
||||||
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
||||||
|
|
||||||
# copy over the raspiblitz.conf created from setup to HDD
|
# copy over the raspiblitz.conf created from setup to HDD
|
||||||
|
@ -580,7 +585,13 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
echo "# Sourcing ${setupFile} " >> ${logFile}
|
echo "# Sourcing ${setupFile} " >> ${logFile}
|
||||||
source ${setupFile}
|
source ${setupFile}
|
||||||
sed -e '/^password/d' ${setupFile} >> ${logFile}
|
sed -e '/^password/d' ${setupFile} >> ${logFile}
|
||||||
|
|
||||||
|
# add some debug info to logfile
|
||||||
|
echo "# df " >> ${logFile}
|
||||||
|
df >> ${logFile}
|
||||||
|
echo "# lsblk -o NAME,FSTYPE,LABEL " >> ${logFile}
|
||||||
|
lsblk -o NAME,FSTYPE,LABEL >> ${logFile}
|
||||||
|
|
||||||
# make sure basic info is in raspiblitz.info
|
# make sure basic info is in raspiblitz.info
|
||||||
echo "# Update ${infoFile} " >> ${logFile}
|
echo "# Update ${infoFile} " >> ${logFile}
|
||||||
sudo sed -i "s/^network=.*/network=${network}/g" ${infoFile}
|
sudo sed -i "s/^network=.*/network=${network}/g" ${infoFile}
|
||||||
|
@ -599,7 +610,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "SETTING PASSWORD A" >> ${logFile}
|
echo "# setting PASSWORD A" >> ${logFile}
|
||||||
sudo /home/admin/config.scripts/blitz.setpassword.sh a "${passwordA}" >> ${logFile}
|
sudo /home/admin/config.scripts/blitz.setpassword.sh a "${passwordA}" >> ${logFile}
|
||||||
|
|
||||||
# if setup - run provision setup first
|
# if setup - run provision setup first
|
||||||
|
|
|
@ -85,13 +85,14 @@ confExists=$(sudo ls /mnt/hdd/${network}/${network}.conf | grep -c "${network}.c
|
||||||
echo "File Exists: /mnt/hdd/${network}/${network}.conf --> ${confExists}" >> ${logFile}
|
echo "File Exists: /mnt/hdd/${network}/${network}.conf --> ${confExists}" >> ${logFile}
|
||||||
|
|
||||||
# set password B as RPC password
|
# set password B as RPC password
|
||||||
echo "SETTING PASSWORD B" >> ${logFile}
|
echo "# setting PASSWORD B" >> ${logFile}
|
||||||
/home/admin/config.scripts/blitz.setpassword.sh b "${passwordB}" >> ${logFile}
|
/home/admin/config.scripts/blitz.setpassword.sh b "${passwordB}" >> ${logFile}
|
||||||
|
|
||||||
# optimize RAM for blockchain validation (bitcoin only)
|
# optimize RAM for blockchain validation (bitcoin only)
|
||||||
if [ "${network}" == "bitcoin" ] && [ "${hddBlocksBitcoin}" == "0" ]; then
|
if [ "${network}" == "bitcoin" ] && [ "${hddBlocksBitcoin}" == "0" ]; then
|
||||||
echo "*** Optimizing RAM for Sync ***" >> ${logFile}
|
echo "*** Optimizing RAM for Sync ***" >> ${logFile}
|
||||||
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||||
|
echo "kbSizeRAM(${kbSizeRAM})" >> ${logFile}
|
||||||
echo "dont forget to reduce dbcache once IBD is done" > "/mnt/hdd/${network}/blocks/selfsync.flag"
|
echo "dont forget to reduce dbcache once IBD is done" > "/mnt/hdd/${network}/blocks/selfsync.flag"
|
||||||
# RP4 4GB
|
# RP4 4GB
|
||||||
if [ ${kbSizeRAM} -gt 3500000 ]; then
|
if [ ${kbSizeRAM} -gt 3500000 ]; then
|
||||||
|
|
|
@ -11,9 +11,11 @@ source $SETUPFILE
|
||||||
|
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
# SELECT BLOCKCHAIN
|
# SELECT BLOCKCHAIN --> SKIPPED (litecoin deactivated, reactivate selection when other bitcoin implementations)
|
||||||
# when not already set by setupfile
|
# when not already set by setupfile
|
||||||
|
if [ "${network}" == "" ]; then
|
||||||
|
network="bitcoin"
|
||||||
|
fi
|
||||||
if [ "${network}" == "" ]; then
|
if [ "${network}" == "" ]; then
|
||||||
|
|
||||||
OPTIONS=()
|
OPTIONS=()
|
||||||
|
|
Loading…
Add table
Reference in a new issue