-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathinstall
executable file
·65 lines (57 loc) · 1.63 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
#!/usr/bin/env bash
set -e
# Use provided repository or default to tomeshnet/prototype-cjdns-pi
if [ -z "$GIT_PROTOTYPE_CJDNS_PI" ]; then
GIT_PROTOTYPE_CJDNS_PI="https://github.com/tomeshnet/prototype-cjdns-pi.git"
fi
# Use provided tag or default to master
if [ -z "$TAG_PROTOTYPE_CJDNS_PI" ]; then
TAG_PROTOTYPE_CJDNS_PI=master
fi
if ps xa | awk '{print $5}' | grep -q dpkg; then
echo -e "\e[1;31mDPKG is running in the background.\e[0m"
read -p "Would you like to KILL it to continue (Y/n)? " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Nn]$ ]]; then
echo -e "\e[1;31mPlease stop DPKG Before Proceeding!\e[0m"
exit
else
echo -e "\e[1;32mKilling DPKG and continuing\e[0m"
sudo killall dpkg
fi
fi
# Get git
# True required to avoid odd armbian bug. Update does work but reports missing file.
sudo apt-get update -y || true
if ! [ "$(which git)" ]; then
sudo apt-get install git -y
fi
# Download prototype-cjdns-pi repo
if ! [ -d "prototype-cjdns-pi" ]; then
git clone $GIT_PROTOTYPE_CJDNS_PI
fi
cd prototype-cjdns-pi/scripts
git checkout $TAG_PROTOTYPE_CJDNS_PI
# Export environment variables
export WITH_YGGDRASIL
export WITH_YGGDRASIL_IPTUNNEL
export WITH_MESH_POINT
export WITH_AD_HOC
export WITH_WIFI_AP
export WITH_FIREWALL
export WITH_CJDNS_IPTUNNEL
export WITH_IPFS
export WITH_PROMETHEUS_NODE_EXPORTER
export WITH_PROMETHEUS_SERVER
export WITH_GRAFANA
export WITH_EXTRA_TOOLS
export WITH_WATCHDOG
export WITH_YRD
export WITH_SSB
export WITH_SSB_PATCHFOO
export WITH_SSB_WEB_PI
export WITH_IPFS_PI_STREAM
export WITH_BMX7
export UNATTENDED
# Run the actual installation script
./install2