File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ function update_script() {
3232 msg_error " No ${APP} Installation Found!"
3333 exit
3434 fi
35- latest_url=$( curl -fsSL " https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -o ' https://.*x64. deb' | head -n1 )
36- latest_version=$( basename " ${ latest_url} " )
35+ latest_url=$( curl -fsSL " https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -oP ' href="([^"]+linux_x64[^"]+\. deb)" ' | sed ' s/href="// ' | sort | tail -n 1 )
36+ latest_version=$( basename " $latest_url " )
3737 if [ -z " ${latest_version} " ]; then
3838 msg_error " It seems that the server (tp-link.com) might be down. Please try again at a later time."
3939 exit
@@ -53,4 +53,4 @@ description
5353msg_ok " Completed Successfully!\n"
5454echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
5555echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
56- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :8043${CL} "
56+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :8043${CL} "
Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ network_check
1414update_os
1515
1616msg_info " Installing Dependencies"
17- $STD apt-get install -y curl
18- $STD apt-get install -y sudo
19- $STD apt-get install -y mc
20- $STD apt-get install -y gnupg
21- $STD apt-get install -y jsvc
17+ $STD apt-get install -y \
18+ curl \
19+ sudo \
20+ mc \
21+ gnupg \
22+ jsvc
2223msg_ok " Installed Dependencies"
2324
2425msg_info " Installing Azul Zulu"
@@ -37,7 +38,7 @@ wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiv
3738$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb
3839msg_ok " Installed MongoDB"
3940
40- latest_url=$( curl -fsSL " https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -o ' https://.*x64. deb' | head -n1 )
41+ latest_url=$( curl -fsSL " https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -oP ' href="([^"]+linux_x64[^"]+\. deb)" ' | sed ' s/href="// ' | sort | tail -n 1 )
4142latest_version=$( basename " $latest_url " )
4243
4344msg_info " Installing Omada Controller"
You can’t perform that action at this time.
0 commit comments