mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-26 08:33:17 +01:00
Update omada.sh
add update path
This commit is contained in:
parent
9cd58e5589
commit
582088fc90
19
ct/omada.sh
19
ct/omada.sh
@ -53,11 +53,22 @@ function default_settings() {
|
|||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
msg_info "Updating ${APP} LXC"
|
latesturl=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1)
|
||||||
apt-get update &>/dev/null
|
latestversion=$(basename "$latesturl" | sed -e 's/.*ller_v//;s/_Li.*//')
|
||||||
apt-get -y upgrade &>/dev/null
|
installed_version=$(dpkg -l | grep omada | awk '{print $3}')
|
||||||
msg_ok "Updated Successfully"
|
|
||||||
|
if [ "$installed_version" = "$latestversion" ]; then
|
||||||
|
echo "Installed version ($installed_version) is the same as the latest version ($latestversion)."
|
||||||
|
echo "Omada is already up to date"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo -e "Updating Omada Controller to v${latestversion}"
|
||||||
|
wget -qL ${latesturl}
|
||||||
|
dpkg -i Omada_SDN_Controller_v${latestversion}_Linux_x64.deb
|
||||||
|
rm -rf Omada_SDN_Controller_v${latestversion}_Linux_x64.deb
|
||||||
|
echo -e "Updated Omada Controller to v${latestversion}"
|
||||||
exit
|
exit
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
Loading…
Reference in New Issue
Block a user