mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
presync when active
This commit is contained in:
parent
c4fd8cbe71
commit
f64d579f65
1 changed files with 16 additions and 4 deletions
|
@ -183,10 +183,22 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
|
||||||
# activating presync
|
# activating presync
|
||||||
# so that on a hackathon you can just connect a RaspiBlitz
|
# so that on a hackathon you can just connect a RaspiBlitz
|
||||||
# to the network and have it up-to-date for setting up
|
# to the network and have it up-to-date for setting up
|
||||||
echo "Found pre-loaded blockchain - starting pre-sync in background" >> $logFile
|
echo "Found pre-loaded blockchain" >> $logFile
|
||||||
# starting in background, because this scripts is part of systemd
|
|
||||||
# so to change systemd needs to happen after delay in seperate process
|
# check if pre-sync was already activated on last power-on
|
||||||
/home/admin/_bootstrap.presync.sh &
|
presyncActive=$(ls /etc/systemd/system/bitcoind.service | grep -c '.service')
|
||||||
|
if [ ${presyncActive} -eq 0]; then
|
||||||
|
echo "starting pre-sync in background" >> $logFile
|
||||||
|
# starting in background, because this scripts is part of systemd
|
||||||
|
# so to change systemd needs to happen after delay in seperate process
|
||||||
|
/home/admin/_bootstrap.presync.sh &
|
||||||
|
else
|
||||||
|
echo "pre-sync is already active" >> $logFile
|
||||||
|
# update info file
|
||||||
|
echo "state=presync" > $infoFile
|
||||||
|
echo "message='pre-sync active'" >> $infoFile
|
||||||
|
echo "device=${hddDeviceName}" >> $infoFile
|
||||||
|
fi
|
||||||
|
|
||||||
# after admin login, presync will be stoped and HDD unmounted
|
# after admin login, presync will be stoped and HDD unmounted
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue