mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-25 22:17:49 +02:00
only create /opt/so/state/eaintegrations.txt when all policies have been created/updated successfully
This commit is contained in:
@@ -59,9 +59,6 @@ if [ ! -f /opt/so/state/eaintegrations.txt ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$RETURN_CODE" != "1" ]]; then
|
|
||||||
touch /opt/so/state/eaintegrations.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Grid Nodes - Heavy
|
# Grid Nodes - Heavy
|
||||||
for INTEGRATION in /opt/so/conf/elastic-fleet/integrations/grid-nodes_heavy/*.json; do
|
for INTEGRATION in /opt/so/conf/elastic-fleet/integrations/grid-nodes_heavy/*.json; do
|
||||||
@@ -85,9 +82,6 @@ if [ ! -f /opt/so/state/eaintegrations.txt ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ "$RETURN_CODE" != "1" ]]; then
|
|
||||||
touch /opt/so/state/eaintegrations.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fleet Server - Optional integrations
|
# Fleet Server - Optional integrations
|
||||||
for INTEGRATION in /opt/so/conf/elastic-fleet/integrations-optional/FleetServer*/*.json; do
|
for INTEGRATION in /opt/so/conf/elastic-fleet/integrations-optional/FleetServer*/*.json; do
|
||||||
@@ -115,6 +109,7 @@ if [ ! -f /opt/so/state/eaintegrations.txt ]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Only create the state file if all policies were created/updated successfully
|
||||||
if [[ "$RETURN_CODE" != "1" ]]; then
|
if [[ "$RETURN_CODE" != "1" ]]; then
|
||||||
touch /opt/so/state/eaintegrations.txt
|
touch /opt/so/state/eaintegrations.txt
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user