From 72d011e54340b20f26944be6b5af5449d3bbd354 Mon Sep 17 00:00:00 2001 From: mbonniot Date: Wed, 18 Feb 2026 16:31:48 +0100 Subject: [PATCH 1/4] [UPGRADE-PKG] Properly stop and restart gunicon in while upgrading system --- usr/local/share/vulture-utils/upgrade-pkg.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr/local/share/vulture-utils/upgrade-pkg.sh b/usr/local/share/vulture-utils/upgrade-pkg.sh index e5f5e9e..8a68a1c 100755 --- a/usr/local/share/vulture-utils/upgrade-pkg.sh +++ b/usr/local/share/vulture-utils/upgrade-pkg.sh @@ -54,6 +54,13 @@ initialize() { /usr/sbin/service vultured stop fi + if /usr/sbin/jexec apache /usr/sbin/service gunicorn status > /dev/null; then + echo "[+] Stopping GUI services..." + _gui_was_up=1 + /usr/sbin/jexec apache /usr/sbin/service gunicorn stop + echo "[-] Ok." + fi + # Disable secadm rules if on an HardenedBSD system if [ -f /usr/sbin/hbsd-update ] ; then echo "[+] Disabling root secadm rules" @@ -167,6 +174,7 @@ finalize() { if [ $_gui_was_up -eq 1 ]; then echo "[+] Restarting GUI services..." /usr/sbin/jexec apache /usr/sbin/service gunicorn start + echo "[-] Ok." fi if [ $_portal_was_up -eq 1 ]; then echo "[+] Restarting Portal services..." From df7fa65136c2ca5a6eaf102cbea27bb005c69ca8 Mon Sep 17 00:00:00 2001 From: mbonniot Date: Tue, 24 Feb 2026 12:18:41 +0100 Subject: [PATCH 2/4] [UPGRADE-PKG] Set toggle_maintenance=off after services have been restarted & clarify error/info logging associated to --- usr/local/share/vulture-utils/upgrade-pkg.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/usr/local/share/vulture-utils/upgrade-pkg.sh b/usr/local/share/vulture-utils/upgrade-pkg.sh index 8a68a1c..63a4cd1 100755 --- a/usr/local/share/vulture-utils/upgrade-pkg.sh +++ b/usr/local/share/vulture-utils/upgrade-pkg.sh @@ -165,21 +165,23 @@ finalize() { echo "[-] Cron restarted" fi - /usr/local/bin/sudo -u vlt-os /home/vlt-os/env/bin/python /home/vlt-os/vulture_os/manage.py toggle_maintenance --off 2>/dev/null || true - if [ $_vultured_was_up -eq 1 ]; then echo "[+] Restarting vultured..." /usr/sbin/service vultured start + echo "[*] Vultured restarted successfully" fi if [ $_gui_was_up -eq 1 ]; then echo "[+] Restarting GUI services..." /usr/sbin/jexec apache /usr/sbin/service gunicorn start - echo "[-] Ok." + echo "[*] GUI restarted successfully" fi if [ $_portal_was_up -eq 1 ]; then echo "[+] Restarting Portal services..." /usr/sbin/jexec portal /usr/sbin/service gunicorn start + echo "[*] Portal restarted successfully" fi + + /usr/local/bin/sudo -u vlt-os /home/vlt-os/env/bin/python /home/vlt-os/vulture_os/manage.py toggle_maintenance --off 2>/dev/null || true fi echo "[$(date -Iseconds)] Upgrade finished!" @@ -318,9 +320,9 @@ if [ -z "${targets}" ] || contains_word "${targets}" "gui" ; then echo "[+] Stopping GUI services..." _gui_was_up=1 /usr/sbin/jexec apache /usr/sbin/service gunicorn stop - echo "[-] Ok." + echo "[*] GUI has been stopped" else - warn "GUI is currently stopped, the service won't be restarted!" + echo "[*] GUI is already stopped" fi if /usr/sbin/jexec portal /usr/sbin/service gunicorn status > /dev/null; then echo "[+] Stopping Portal services..." @@ -328,7 +330,7 @@ if [ -z "${targets}" ] || contains_word "${targets}" "gui" ; then /usr/sbin/jexec portal /usr/sbin/service gunicorn stop echo "[-] Ok." else - warn "Portal is currently stopped, the service won't be restarted!" + warn "Portal is already stopped" fi echo "[+] Updating vulture-gui package..." From f0c8c1380054883e1f0a97b0e52fcb4875deefbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Bertin?= Date: Wed, 25 Feb 2026 15:44:41 +0100 Subject: [PATCH 3/4] doc(CHANGELOG): Adapt lines to new dev --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3e88d4c..8116d59 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [COMMON] Use new mongodb `connect` command to interact with all versions of DB - [UPGRADE-PKG] Restart GUI/Portal services only at the end of an upgrade ### Fixed -- [UPGRADE-PKG] Only restart jail service(s) when corresponding package is upgraded +- [UPGRADE-PKG] Stop GUI services for the entire duration of the upgrade - [UPGRADE-OS] Do not check version when specifying a version to install From abb378cbf3f64dc0c54e700b3a3069a5fdd1894d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Bertin?= Date: Wed, 25 Feb 2026 15:47:28 +0100 Subject: [PATCH 4/4] chore(logs): Adjust log lines --- usr/local/share/vulture-utils/upgrade-pkg.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr/local/share/vulture-utils/upgrade-pkg.sh b/usr/local/share/vulture-utils/upgrade-pkg.sh index 63a4cd1..e186f78 100755 --- a/usr/local/share/vulture-utils/upgrade-pkg.sh +++ b/usr/local/share/vulture-utils/upgrade-pkg.sh @@ -168,17 +168,17 @@ finalize() { if [ $_vultured_was_up -eq 1 ]; then echo "[+] Restarting vultured..." /usr/sbin/service vultured start - echo "[*] Vultured restarted successfully" + echo "[-] Vultured restarted successfully" fi if [ $_gui_was_up -eq 1 ]; then echo "[+] Restarting GUI services..." /usr/sbin/jexec apache /usr/sbin/service gunicorn start - echo "[*] GUI restarted successfully" + echo "[-] GUI restarted successfully" fi if [ $_portal_was_up -eq 1 ]; then echo "[+] Restarting Portal services..." /usr/sbin/jexec portal /usr/sbin/service gunicorn start - echo "[*] Portal restarted successfully" + echo "[-] Portal restarted successfully" fi /usr/local/bin/sudo -u vlt-os /home/vlt-os/env/bin/python /home/vlt-os/vulture_os/manage.py toggle_maintenance --off 2>/dev/null || true @@ -320,7 +320,7 @@ if [ -z "${targets}" ] || contains_word "${targets}" "gui" ; then echo "[+] Stopping GUI services..." _gui_was_up=1 /usr/sbin/jexec apache /usr/sbin/service gunicorn stop - echo "[*] GUI has been stopped" + echo "[-] GUI has been stopped" else echo "[*] GUI is already stopped" fi @@ -330,7 +330,7 @@ if [ -z "${targets}" ] || contains_word "${targets}" "gui" ; then /usr/sbin/jexec portal /usr/sbin/service gunicorn stop echo "[-] Ok." else - warn "Portal is already stopped" + echo "[*] Portal is already stopped" fi echo "[+] Updating vulture-gui package..."