-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_qtum.bash
56 lines (35 loc) · 1.79 KB
/
install_qtum.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
echo "This script will turn your raspberry pi in to a QTUM Stakebox."
echo "If you have any questions, reach out to me on Discord."
echo "First we are going to detect if you are running Raspian Stretch or Jessie."
raspian_version=$(lsb_release -d)
if [[ $raspian_version = *"(stretch)"* ]]; then
echo "You are using Raspian Stretch"
echo "deb http://repo.qtum.info/apt/raspbian/ stretch main" | sudo tee -a /etc/apt/sources.list
elif [[ $raspbian_version = *"(jessie)"* ]]; then
echo "You are using Raspian Jessie"
echo "deb http://repo.qtum.info/apt/raspbian/ jessie main" | sudo tee -a /etc/apt/sources.list
else
echo "You aren't using Raspian Stretch or Jessie. This can't be turned into a Raspi QTUM Stakebox."
exit 1
fi
echo "Now, we download the QTUM public key."
wget -qO - http://repo.qtum.info/apt/public.key | sudo apt-key add -
echo "Updating local sources..."
sudo apt-get update
echo "Installing qtum..."
sudo apt-get install qtum -y
echo "Starting the qtum daemon..."
curl -L https://raw.githubusercontent.com/Naesen8585/raspi-qtum-stakebox/master/run-qtum-daemon.sh | bash
echo "Now we are going to set up the qtum service so that when the system starts (like after a power failure)"
echo "QTUM Staking will immediately start."
curl -L https://raw.githubusercontent.com/Naesen8585/raspi-qtum-stakebox/master/qtumd.service | sudo tee -a /etc/systemd/system/qtumd.service
sudo systemctl daemon-reload
sudo systemctl enable qtumd.service
echo "Service enabled!"
echo "At this point, qtumd is installed on your system."
echo "To access the commands you can run, use 'qtum-cli help'"
echo "To finish installation and ensure everything is functioning properly,"
echo "We'll need to reboot your pi. Press Enter to do so."
read -p "Press enter to Reboot your Pi" </dev/tty
sudo reboot