-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
44 lines (38 loc) · 1.08 KB
/
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
42
43
44
#!/bin/bash
#### File: install.sh
#### Version: 1.5a
#### Description: Worker
#### Author: Dave (/u/topiaryx) - [email protected] - 28 August 2017 - Utah
#### Check for root permissions
root_check() {
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root to run this script."
exit $E_NOTROOT
fi
}
root_check
#### Get helper scripts
get_helpers() {
wget https://raw.githubusercontent.com/topiaryx/grafana_centos7/master/functions.sh && chmod +x functions
wget https://raw.githubusercontent.com/topiaryx/grafana_centos7/master/strings.sh && chmod +x strings
}
get_helpers
#### Load helper scripts
load_helpers() {
source $(dirname "$0")/functions.sh && source $(dirname "$0")/strings.sh
}
load_helpers
#### Execute
clear
while true; do
echo -e "Welcome to the Docker/Grafana/InfluxDB and Graphite Install-o-matic 9000!"
echo
echo -e "Do you want to update your system? [y/n]: "
read onsey
case $onsey in
[yY] ) install_update; break;;
[nN] ) install_noupdate; break;;
* ) echo -e "Please answer 'y' or 'n' ";;
esac
done