-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinuxtools.sh
More file actions
167 lines (132 loc) · 5.31 KB
/
linuxtools.sh
File metadata and controls
167 lines (132 loc) · 5.31 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/bin/bash
server_debian="https://downloads.tableau.com/esdalt/10.5.1/tableau-server-10-5-1_amd64.deb"
#"https://downloads.tableau.com/esdalt/10.5.0/tableau-server-10-5-0_amd64.deb"
server_rhel="https://downloads.tableau.com/esdalt/10.5.1/tableau-server-10-5-1.x86_64.rpm"
#"https://downloads.tableau.com/esdalt/10.5.0/tableau-server-10-5-0.x86_64.rpm"
md5_debian="6F87C8D625327712474A1FFE12A04C02"
md5_rhel="2F373B8427329BD28398A143396C5931"
installer_debian="https://github.com/tableau/server-install-script-samples/raw/master/linux/automated-installer/packages/tableau-server-automated-installer-10-5-0_all.deb"
installer_rhel="https://github.com/tableau/server-install-script-samples/raw/master/linux/automated-installer/packages/tableau-server-automated-installer-10-5-0.noarch.rpm"
config_json="https://raw.githubusercontent.com/tableau/server-install-script-samples/master/linux/automated-installer/config.json"
reg_templ="https://raw.githubusercontent.com/tableau/server-install-script-samples/master/linux/automated-installer/reg_templ.json"
secrets_file="https://raw.githubusercontent.com/tableau/server-install-script-samples/master/linux/automated-installer/secrets"
echo $'\n'
echo "Welcome to the Interactive Tableau Server Installer."
echo $'\n'
echo "What do you wanna do?"
echo $'\n'
prompt="Pick an option:"
options=("Download Tableau Server" "Download Automated Install Script" "Generate Template Files" "Install Tableau Server Using Automated Install" "Verify Hardware Setup")
PS3="$prompt "
select opt in "${options[@]}" "Quit"; do
case "$REPLY" in
1 ) echo "$opt"
echo $'\n'
echo "Select Your Flavor"
echo $'\n'
prompt="Pick an option:"
options=("Debian" "RHEL")
PS3="$prompt "
select os in "${options[@]}" "Quit"; do
case "$REPLY" in
1 ) echo "You picked $opt and $os";
echo "Initiating Download..."
wget -c $server_debian
md5_debian=$(echo "$md5_debian" | tr '[:lower:]' '[:upper:]')
md5=($(md5sum ${server_debian##*/}))
md5=$(echo "$md5" | tr '[:lower:]' '[:upper:]')
#echo $md5
#echo $md5_debian
if [ $md5 == $md5_debian ]
then
echo -e "\e[42mFile Verified! Everything is fine."
echo -e "\e[49m"
else
echo -e "\e[41mCorrupted File! Download it again."
echo -e "\e[49m"
fi
break;;
2 ) echo "You picked $opt and $os";
echo "Initiating Download..."
wget -c $server_rhel
md5_debian=$(echo "$md5_rhel" | tr '[:lower:]' '[:upper:]')
md5=($(md5sum ${server_rhel##*/}))
md5=$(echo "$md5" | tr '[:lower:]' '[:upper:]')
#echo $md5
#echo $md5_rhel
if [ $md5 == $md5_rhel ]
then
echo -e "\e[42mFile Verified! Everything is fine."
echo -e "\e[49m"
else
echo -e "\e[41mCorrupted File! Download it again."
echo -e "\e[49m"
fi
break;;
$(( ${#options[@]}+1 )) ) echo "Goodbye!"; break;;
*) echo "Invalid option. Try another one.";continue;;
esac
done
break;;
2 ) echo "$opt"
echo $'\n'
echo "Select Your OS"
echo $'\n'
prompt="Pick an option:"
options=("Ubuntu" "CentOs")
PS3="$prompt "
select os in "${options[@]}" "Quit"; do
case "$REPLY" in
1 ) echo "You picked $opt and $os";
echo "Initiating Download..."
wget -c $installer_debian
break;;
2 ) echo "You picked $opt and $os";
echo "Initiating Download..."
wget -c $installer_rhel
break;;
$(( ${#options[@]}+1 )) ) echo "Goodbye!"; break;;
*) echo "Invalid option. Try another one.";continue;;
esac
done
break;;
3 ) echo "$opt"
#read -p "Press any key..."
wget -c $config_json
wget -c $reg_templ
wget -c $secrets_file
break;;
4 ) echo "$opt"
echo $'\n'
echo "Select Your OS"
echo $'\n'
prompt="Pick an option:"
options=("Ubuntu" "CentOs")
PS3="$prompt "
select os in "${options[@]}" "Quit"; do
case "$REPLY" in
1 ) echo "You picked $opt and $os"; break;;
2 ) echo "You picked $opt and $os"; break;;
$(( ${#options[@]}+1 )) ) echo "Goodbye!"; break;;
*) echo "Invalid option. Try another one.";continue;;
esac
done
break;;
5 ) echo "$opt"
echo $'\n'
echo "CPU Info:"
echo $'\n'
lscpu
echo $'\n'
echo "Memory Info:"
echo $'\n'
free –h
echo $'\n'
echo "Disk Info:"
echo $'\n'
df -h
break;;
$(( ${#options[@]}+1 )) ) echo "Goodbye!"; break;;
*) echo "Invalid option. Try another one.";continue;;
esac
done