mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
continue loop after encountering error with first
This commit is contained in:
@@ -44,6 +44,7 @@ for AGENT_POLICY in $agent_policies; do
|
||||
|
||||
if [[ "$PACKAGE_VERSION" != "$AVAILABLE_VERSION" ]]; then
|
||||
# Dry run of the upgrade
|
||||
echo ""
|
||||
echo "Current $PACKAGE_NAME package version ($PACKAGE_VERSION) is not the same as the latest available package ($AVAILABLE_VERSION)..."
|
||||
echo "Upgrading $INTEGRATION..."
|
||||
echo "Starting dry run..."
|
||||
@@ -55,12 +56,12 @@ for AGENT_POLICY in $agent_policies; do
|
||||
echo "No errors detected. Proceeding with upgrade..."
|
||||
elastic_fleet_integration_policy_upgrade "$INTEGRATION_ID"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Upgrade failed for integration ID '$INTEGRATION_ID'."
|
||||
exit 1
|
||||
echo "Error: Upgrade failed for $PACKAGE_NAME with integration ID '$INTEGRATION_ID'."
|
||||
continue
|
||||
fi
|
||||
else
|
||||
echo "Errors detected during dry run. Stopping upgrade..."
|
||||
exit 1
|
||||
echo "Errors detected during dry run. Skipping $PACKAGE_NAME policy upgrade..."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
{%- if not AUTO_UPGRADE_INTEGRATIONS %}
|
||||
|
||||
Reference in New Issue
Block a user