forked from hoprnet/hopr-sh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-hoprd.sh
executable file
·38 lines (33 loc) · 1.78 KB
/
setup-hoprd.sh
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
#!/bin/bash
RED='\033[0;91m'
CYAN='\033[0;96m'
YELLOW='\033[1;93m'
NC='\033[0m' # No Color
# print HOPR logo
echo -e "
${YELLOW}██╗ ██╗ ██████╗ ██████╗ ██████╗ \n██║ ██║██╔═══██╗██╔══██╗██╔══██╗\n███████║██║ ██║██████╔╝██████╔╝\n██╔══██║██║ ██║██╔═══╝ ██╔══██╗\n██║ ██║╚██████╔╝██║ ██║ ██║\n╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝\n${NC}"
# print policy warning
echo -e ${CYAN}By installing this node, you agree to our Privacy Policy found at https://hoprnet.org/privacy-policy${NC}
while [ "$response" != "n" ]
do
read -p "Do you agree to our Privacy Policy? [y/n]:" response
case $response in
y) echo Terrific!
echo -e ${RED}Warning! Running this script repeatedly will cause you to have a new node address each time.${NC}
read -p "Would you like to run this script? [y/n]:" response
case $response in
y) echo What release are you installing? Format: X.XX.X \(https://github.com/hoprnet/hoprnet/releases\)
read vrelease
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt -y install gcc g++ make
sudo apt -y install nodejs
sudo npm install --unsafe-perm=true -g @hoprnet/hoprd@$vrelease
hoprd --help
exit ;;
n)
echo "Goodbye!"
exit ;;
esac
esac
done