Skip to content

Commit d17eb8e

Browse files
authored
Omada zulu 8 to 21 (#3318)
* change zulu8 to zulu21 * Add check in updatescript
1 parent 6193164 commit d17eb8e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ct/omada.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ function update_script() {
4242
$STD apt-get install -y --only-upgrade mongodb-org
4343
msg_ok "Updated MongoDB to $MONGODB_VERSION"
4444

45+
msg_info "Checking if right Azul Zulu Java is installed"
46+
java_version=$(java -version 2>&1 | awk -F[\"_] '/version/ {print $2}')
47+
if [[ "$java_version" =~ ^1\.8\.* ]]; then
48+
$STD apt-get remove --purge -y zulu8-jdk
49+
$STD apt-get -y install zulu21-jdk
50+
msg_ok "Updated Azul Zulu Java to 21"
51+
else
52+
msg_ok "Azul Zulu Java 21 already installed"
53+
fi
54+
4555
msg_info "Updating Omada Controller"
4656
latest_url=$(curl -s "https://support.omadanetworks.com/en/download/software/omada-controller/" | grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | head -n 1)
4757
latest_version=$(basename "$latest_url")
@@ -51,7 +61,8 @@ function update_script() {
5161
fi
5262

5363
wget -qL ${latest_url}
54-
dpkg -i ${latest_version}
64+
export DEBIAN_FRONTEND=noninteractive
65+
$STD dpkg -i ${latest_version}
5566
rm -rf ${latest_version}
5667
msg_ok "Updated Omada Controller"
5768
}

install/omada-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/
3434
wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
3535
$STD dpkg -i zulu-repo_1.0.0-3_all.deb
3636
$STD apt-get update
37-
$STD apt-get -y install zulu8-jdk
37+
$STD apt-get -y install zulu21-jdk
3838
msg_ok "Installed Azul Zulu Java"
3939

4040
msg_info "Installing libssl (if needed)"

0 commit comments

Comments
 (0)