mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-18 18:07:45 +01:00
fix start pre-sync
This commit is contained in:
@@ -19,6 +19,7 @@ if [ ${bootstrapInfoExists} -eq 1 ]; then
|
|||||||
sudo systemctl disable bitcoind.service
|
sudo systemctl disable bitcoind.service
|
||||||
sudo rm /mnt/hdd/bitcoin/bitcoin.conf
|
sudo rm /mnt/hdd/bitcoin/bitcoin.conf
|
||||||
sudo rm /etc/systemd/system/bitcoind.service
|
sudo rm /etc/systemd/system/bitcoind.service
|
||||||
|
sudo unlink /home/bitcoin/.bitcoin
|
||||||
|
|
||||||
# unmount the temporary mount
|
# unmount the temporary mount
|
||||||
sudo umount -l /mnt/hdd
|
sudo umount -l /mnt/hdd
|
||||||
|
|||||||
@@ -175,6 +175,11 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
|
|||||||
blockchainDataExists=$(ls /mnt/hdd/bitcoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
|
blockchainDataExists=$(ls /mnt/hdd/bitcoin/blocks/blk00000.dat 2>/dev/null | grep -c '.dat')
|
||||||
if [ ${blockchainDataExists} -eq 1 ]; then
|
if [ ${blockchainDataExists} -eq 1 ]; then
|
||||||
|
|
||||||
|
# update info file
|
||||||
|
echo "state=presync" > $infoFile
|
||||||
|
echo "message='starting pre-sync'" >> $infoFile
|
||||||
|
echo "device=${hddDeviceName}" >> $infoFile
|
||||||
|
|
||||||
# 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
|
||||||
@@ -182,12 +187,15 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
|
|||||||
sudo cp /home/admin/assets/bitcoin.conf /mnt/hdd/bitcoin/bitcoin.conf
|
sudo cp /home/admin/assets/bitcoin.conf /mnt/hdd/bitcoin/bitcoin.conf
|
||||||
sudo cp /home/admin/assets/bitcoind.service /etc/systemd/system/bitcoind.service
|
sudo cp /home/admin/assets/bitcoind.service /etc/systemd/system/bitcoind.service
|
||||||
sudo chmod +x /etc/systemd/system/bitcoind.service
|
sudo chmod +x /etc/systemd/system/bitcoind.service
|
||||||
|
sudo ln -s /mnt/hdd/bitcoin /home/bitcoin/.bitcoin
|
||||||
|
echo "pre-sync: starting services" >> $logFile
|
||||||
sudo systemctl enable bitcoind.service
|
sudo systemctl enable bitcoind.service
|
||||||
sudo systemctl start bitcoind.service
|
sudo systemctl start bitcoind.service
|
||||||
|
echo "pre-sync: started" >> $logFile
|
||||||
|
|
||||||
# update info file
|
# update info file
|
||||||
echo "state=presync" > $infoFile
|
echo "state=presync" > $infoFile
|
||||||
echo "message='starting pre-sync'" >> $infoFile
|
echo "message='started pre-sync'" >> $infoFile
|
||||||
echo "device=${hddDeviceName}" >> $infoFile
|
echo "device=${hddDeviceName}" >> $infoFile
|
||||||
|
|
||||||
# after admin login, presync will be stoped and HDD unmounted
|
# after admin login, presync will be stoped and HDD unmounted
|
||||||
|
|||||||
Reference in New Issue
Block a user