From 59a752a6ab74b320a7ac5d9f6246909aaa0308c3 Mon Sep 17 00:00:00 2001 From: durzo Date: Sun, 28 Dec 2025 19:21:16 +0000 Subject: [PATCH] Fix mongodb update logic (#10388) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix mongodb update logic * Simplify MongoDB installation check --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/mongodb.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ct/mongodb.sh b/ct/mongodb.sh index 2de56fb29..89d7ec4cf 100644 --- a/ct/mongodb.sh +++ b/ct/mongodb.sh @@ -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 }