forked from suriyadeepan/cjdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·68 lines (54 loc) · 1.31 KB
/
install
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
57
58
59
60
61
62
63
64
65
#!/bin/bash
echo "#0 Install Dependencies"
echo
##################
# install build dependencies
#
##################
if [ -f /etc/debian_version ]; then
sudo apt-get install nodejs git build-essential
elif [ -f /etc/redhat-release ]; then
sudo dnf groupinstall "Development Tools"
sudo dnf install nodejs
else
echo "Try installing packages manually. Not a deb / rpm based distribution"
exit
fi
echo "#1 Build Source"
echo
##################
# build source
#
##################
./do || { echo "-> Build failed (#1) : exiting now <-"; exit 1; }
echo "#2 Generate Configuration file"
echo
##################
# build source
#
##################
./cjdroute --genconf >> conf.tmp || { echo "-> Config Gen failed (#2) : exiting now <-"; exit 1; }
echo -n "#3 Add Public Peers to config file"
echo
##################
# add public peers
#
##################
head -n 68 conf.tmp > cjdroute.conf
cat ppeers.list >> cjdroute.conf
tail -n +69 conf.tmp >> cjdroute.conf
echo "#4 run cjdroute"
echo
##################
# start cjdroute
# #remove conf.tmp#
##################
rm conf.tmp
sudo ./cjdroute < cjdroute.conf || { echo "-> running cjdroute failed; check cjdroute.conf (#4) : exiting now <-"; exit 1; }
echo "#5 ping uppit.us"
echo
##################
# ping uppit.us
#
##################
ping6 uppit.us