Skip to content

Commit adb6b50

Browse files
author
Matt
committed
Added a script to streamline the creation of new images
1 parent 62f57d0 commit adb6b50

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

libs/release_setup.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
LOG_FILE="/home/pi/release_log.txt"
4+
BOOTSTRAP_URL="https://build.nav.community/bootstrap/bootstrap-navcoin.tar"
5+
VERSION="1.0.7"
6+
7+
echo "WARNING THIS SCRIPT WILL DELETE YOUR WALLET.DAT. THERE IS NO WAY TO RECOVER YOUR COINS WITHOUT A BACK UP. THIS SCRIPT IS ONLY FOR USE WHEN CREATING NEW NAVPI IMAGES"
8+
echo "TO CONTINUE ENTER 'DELETE' OR ENTER ANYTHING ELSE TO EXIT"
9+
read USER_INPUT
10+
if [ $USER_INPUT == "DELETE" ]
11+
then
12+
echo -n "Starting NavPi $VERSION Release Script: " > $LOG_FILE
13+
date >> $LOG_FILE
14+
15+
echo "Killing daemon" >> $LOG_FILE
16+
killall navcoind >> $LOG_FILE
17+
18+
#echo "Deleting old blockchain" >> $LOG_FILE
19+
#sudo rm -rfv /home/stakebox/.navcoin4/chainstate && sudo rm -rf /home/stakebox/.navcoin4/blocks
20+
21+
#echo "Downloading latest blockchain bootstrap" >> $LOG_FILE
22+
#wget $BOOTSTRAP_URL --no-verbose --append-output=$LOG_FILE
23+
24+
#echo "Untaring the bootstrap" >> $LOG_FILE
25+
26+
#echo "Moving files" >> $LOG_FILE
27+
#sudo mv ./bootstrap/debian/.navcoin4/chainstate /home/stakebox/.navcoin4/chainstate && mv ./bootstrap/debian/.navcoin4/blocks /home/stakebox/.navcoin4/blocks
28+
29+
echo "Updating the OS packages" >> $LOG_FILE
30+
sudo apt update && apt upgrade -y >> $LOG_FILE
31+
32+
echo "Updating the UI" >> $LOG_FILE
33+
cd /home/stakebox/UI
34+
sudo git fetch origin && git pull >> $LOG_FILE
35+
36+
echo "Updating the wallet" >> $LOG_FILE
37+
sudo /home/stakebox/UI/libs/updater.sh >> $LOG_FILE
38+
39+
echo "Deleting the wallet.dat" >> $LOG_FILE
40+
sudo rm -rfv /home/stakebox/.navcoin4/wallet.dat >> $LOG_FILE
41+
42+
echo "Clearing bash history and exiting." >> $LOG_FILE
43+
cat /dev/null >> /home/pi/.bash_history && history -c && exit
44+
45+
else
46+
echo "EXITING RELEASE SCRIPT"
47+
fi

0 commit comments

Comments
 (0)