@@ -19,20 +19,17 @@ msg_ok "Installed Dependencies"
1919
2020msg_info " Checking CPU Features"
2121if lscpu | grep -q ' avx' ; then
22- USE_AVX=true
2322 MONGODB_VERSION=" 7.0"
2423 msg_ok " AVX detected: Using MongoDB 7.0"
2524else
26- USE_AVX=false
27- MONGODB_VERSION=" 4.4"
2825 msg_error " No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/"
29- exit 1
26+ exit 0
3027fi
3128
3229msg_info " Installing Azul Zulu Java"
3330curl -fsSL " https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" -o " /etc/apt/trusted.gpg.d/zulu-repo.asc"
34- curl -fsSL " https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o $( basename " https://cdn.azul.com/ zulu/bin/zulu-repo_1.0.0-3_all. deb" )
35- $STD dpkg -i zulu-repo_1.0.0-3_all .deb
31+ curl -fsSL " https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o zulu-repo. deb
32+ $STD dpkg -i zulu-repo .deb
3633$STD apt-get update
3734$STD apt-get -y install zulu21-jre-headless
3835msg_ok " Installed Azul Zulu Java"
@@ -43,8 +40,6 @@ if ! dpkg -l | grep -q 'libssl1.1'; then
4340 $STD dpkg -i /tmp/libssl.deb
4441 rm -f /tmp/libssl.deb
4542 msg_ok " Installed libssl1.1"
46- else
47- msg_ok " libssl1.1 already installed"
4843fi
4944
5045msg_info " Installing MongoDB $MONGODB_VERSION "
@@ -55,18 +50,19 @@ $STD apt-get install -y mongodb-org
5550msg_ok " Installed MongoDB $MONGODB_VERSION "
5651
5752msg_info " Installing Omada Controller"
58- latest_url=$( curl -fsSL " https://support.omadanetworks.com/en/download/software/omada-controller/" | grep -o ' https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | head -n 1)
59- latest_version=$( basename " $latest_url " )
60-
61- curl -fsSL " ${latest_url} " -O
62- $STD dpkg -i ${latest_version}
53+ OMADA_URL=$( curl -fsSL " https://support.omadanetworks.com/en/download/software/omada-controller/" |
54+ grep -o ' https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' |
55+ head -n1)
56+ OMADA_PKG=$( basename " $OMADA_URL " )
57+ curl -fsSL " $OMADA_URL " -o " $OMADA_PKG "
58+ $STD dpkg -i " $OMADA_PKG "
6359msg_ok " Installed Omada Controller"
6460
6561motd_ssh
6662customize
6763
6864msg_info " Cleaning up"
69- rm -rf ${latest_version} zulu-repo_1.0.0-3_all .deb
65+ rm -rf " $OMADA_PKG " zulu-repo .deb
7066$STD apt-get -y autoremove
7167$STD apt-get -y autoclean
7268msg_ok " Cleaned"
0 commit comments