forked from flightaware/fa-grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·41 lines (33 loc) · 847 Bytes
/
install.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
39
40
41
#!/bin/bash
# Script to install required programs to run fa-grafana
echo "Installing required programs to set up fa-grafana..."
# install required packages
requirements=("git pip3 docker docker-compose")
apt-get update
for program in $requirements
do
if [ ! -x "$(command -v $program)" ]; then
echo "Installing $program..."
case $program in
git)
apt-get install -y $program
;;
pip3)
apt-get install -y python3-pip
;;
docker-compose)
pip3 install docker-compose > /dev/null
;;
docker)
curl -sSL https://get.docker.com | sh > /dev/null
echo "Adding pi user to docker group..."
usermod -aG docker pi
;;
*)
;;
esac
else
echo "$program installed. Proceeding..."
fi
done
echo "All necessary programs installed! Clone the fa-grafana directory and start up docker containers using docker-compose."