mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-28 03:40:03 +00:00
Add patchmon-agent report execution in update script (#14054)
This commit is contained in:
parent
f985d84952
commit
1c169fc7e2
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue