Fix mongodb update logic (#10388)

* Fix mongodb update logic

* Simplify MongoDB installation check

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
durzo
2025-12-28 19:21:16 +00:00
committed by GitHub
parent 99a7f30b06
commit 59a752a6ab

View File

@@ -23,13 +23,14 @@ function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/apt/sources.list.d/mongodb-org-7.0.list && ! -f /etc/apt/sources.list.d/mongodb-org-8.0.list ]]; then
msg_error "No ${APP} Installation Found!"
exit
if ! command -v mongod &>/dev/null; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP} LXC"
msg_info "Updating MongoDB LXC"
$STD apt update
$STD apt -y upgrade
$STD apt upgrade -y
msg_ok "Updated successfully!"
exit
}