mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-04-18 23:55:13 +00:00
Omada: Increase RAM to 3GB and little improvements (#3885)
This commit is contained in:
parent
5def868c67
commit
d7757aa5d1
21
ct/omada.sh
21
ct/omada.sh
@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
APP="Omada"
|
||||
var_tags="${var_tags:-tp-link;controller}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
@ -53,17 +53,18 @@ function update_script() {
|
||||
fi
|
||||
|
||||
msg_info "Updating Omada Controller"
|
||||
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)
|
||||
latest_version=$(basename "$latest_url")
|
||||
if [ -z "${latest_version}" ]; then
|
||||
msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time."
|
||||
exit
|
||||
OMADA_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 -n1)
|
||||
OMADA_PKG=$(basename "$OMADA_URL")
|
||||
if [ -z "$OMADA_PKG" ]; then
|
||||
msg_error "Could not retrieve Omada package – server may be down."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -fsSL "${latest_url}" -O
|
||||
curl -fsSL "$OMADA_URL" -o "$OMADA_PKG"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
$STD dpkg -i ${latest_version}
|
||||
rm -rf ${latest_version}
|
||||
$STD dpkg -i "$OMADA_PKG"
|
||||
rm -f "$OMADA_PKG"
|
||||
msg_ok "Updated Omada Controller"
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
"script": "ct/omada.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"ram": 3072,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
@ -31,4 +31,4 @@
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
||||
}
|
||||
|
@ -19,20 +19,17 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Checking CPU Features"
|
||||
if lscpu | grep -q 'avx'; then
|
||||
USE_AVX=true
|
||||
MONGODB_VERSION="7.0"
|
||||
msg_ok "AVX detected: Using MongoDB 7.0"
|
||||
else
|
||||
USE_AVX=false
|
||||
MONGODB_VERSION="4.4"
|
||||
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/"
|
||||
exit 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
msg_info "Installing Azul Zulu Java"
|
||||
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" -o "/etc/apt/trusted.gpg.d/zulu-repo.asc"
|
||||
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")
|
||||
$STD dpkg -i zulu-repo_1.0.0-3_all.deb
|
||||
curl -fsSL "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o zulu-repo.deb
|
||||
$STD dpkg -i zulu-repo.deb
|
||||
$STD apt-get update
|
||||
$STD apt-get -y install zulu21-jre-headless
|
||||
msg_ok "Installed Azul Zulu Java"
|
||||
@ -43,8 +40,6 @@ if ! dpkg -l | grep -q 'libssl1.1'; then
|
||||
$STD dpkg -i /tmp/libssl.deb
|
||||
rm -f /tmp/libssl.deb
|
||||
msg_ok "Installed libssl1.1"
|
||||
else
|
||||
msg_ok "libssl1.1 already installed"
|
||||
fi
|
||||
|
||||
msg_info "Installing MongoDB $MONGODB_VERSION"
|
||||
@ -55,18 +50,19 @@ $STD apt-get install -y mongodb-org
|
||||
msg_ok "Installed MongoDB $MONGODB_VERSION"
|
||||
|
||||
msg_info "Installing Omada Controller"
|
||||
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)
|
||||
latest_version=$(basename "$latest_url")
|
||||
|
||||
curl -fsSL "${latest_url}" -O
|
||||
$STD dpkg -i ${latest_version}
|
||||
OMADA_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 -n1)
|
||||
OMADA_PKG=$(basename "$OMADA_URL")
|
||||
curl -fsSL "$OMADA_URL" -o "$OMADA_PKG"
|
||||
$STD dpkg -i "$OMADA_PKG"
|
||||
msg_ok "Installed Omada Controller"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf ${latest_version} zulu-repo_1.0.0-3_all.deb
|
||||
rm -rf "$OMADA_PKG" zulu-repo.deb
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
Loading…
x
Reference in New Issue
Block a user