raspiblitz/home.admin/50syncHDD.sh

36 lines
988 B
Bash
Raw Normal View History

2018-12-05 00:07:58 +01:00
#!/bin/bash
2018-07-17 13:12:03 +02:00
2018-12-06 14:36:02 +01:00
## get basic info
source /home/admin/raspiblitz.info 2>/dev/null
2018-07-17 13:12:03 +02:00
2018-07-29 01:33:54 +02:00
# only show warning when bitcoin
if [ "$network" = "bitcoin" ]; then
msg=""
msg="$msg Syncing is just practical for Bitcoin TESTNET!\n"
msg="$msg TESTNET is OK for learning, testing and development.\n"
msg="$msg MAINNET is where things get real and fun.\n"
msg="$msg \n"
msg="$msg Syncing MAINNET on a raspberry is NOT practical.\n"
msg="$msg If you want MAINET, go back & try DOWNLOAD.\n"
msg="$msg \n"
msg="$msg Do you really want to work with ONLY TESTNET?"
dialog --title " WARNING " --yesno "${msg}" 12 57
response=$?
case $response in
0) echo "--> OK";;
1) ./10setupBlitz.sh; exit 1;;
255) ./10setupBlitz.sh; exit 1;;
esac
fi
2018-07-17 13:12:03 +02:00
echo "*** Activating Blockain Sync ***"
2018-07-29 01:33:54 +02:00
sudo mkdir /mnt/hdd/${network}
2018-07-17 13:12:03 +02:00
echo "OK - sync is activated"
# set SetupState
2018-12-06 03:32:19 +01:00
sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info
2018-07-17 13:12:03 +02:00
# continue setup
./60finishHDD.sh