From 1c169fc7e2632e7d7a4a7358f9f502dc2227d520 Mon Sep 17 00:00:00 2001 From: Joerg Heinemann Date: Mon, 27 Apr 2026 10:17:05 +0200 Subject: [PATCH] Add patchmon-agent report execution in update script (#14054) --- tools/pve/update-lxcs-cron.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/pve/update-lxcs-cron.sh b/tools/pve/update-lxcs-cron.sh index 15ca40540..d7abc4cae 100644 --- a/tools/pve/update-lxcs-cron.sh +++ b/tools/pve/update-lxcs-cron.sh @@ -66,10 +66,20 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do pct start "$container" sleep 5 update_container "$container" || echo " [Error] Update failed for $container" + # check if patchmon agent is present in container and run a report if found + if pct exec "$container" -- [ -e "/usr/local/bin/patchmon-agent" ]; then + echo -e "${BL}[Info]${GN} patchmon-agent found in ${BL} $container ${CL}, triggering report. \n" + pct exec "$container" -- "/usr/local/bin/patchmon-agent" "report" + fi echo -e "[Info] Shutting down $container" pct shutdown "$container" --timeout 60 & elif [ "$status" == "status: running" ]; then update_container "$container" || echo " [Error] Update failed for $container" + # check if patchmon agent is present in container and run a report if found + if pct exec "$container" -- [ -e "/usr/local/bin/patchmon-agent" ]; then + echo -e "${BL}[Info]${GN} patchmon-agent found in ${BL} $container ${CL}, triggering report. \n" + pct exec "$container" -- "/usr/local/bin/patchmon-agent" "report" + fi fi fi done