mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Enable forced update
This commit is contained in:
@@ -46,6 +46,13 @@ NEW_LIST_JSON=$(jq --compact-output --null-input '$ARGS.positional' --args -- "$
|
|||||||
NEW_HASH=$(sha1sum <<< "$NEW_LIST_JSON" | awk '{print $1}')
|
NEW_HASH=$(sha1sum <<< "$NEW_LIST_JSON" | awk '{print $1}')
|
||||||
|
|
||||||
# Compare the current & new list of URLs - if different, update the Fleet Elasticsearch URLs
|
# Compare the current & new list of URLs - if different, update the Fleet Elasticsearch URLs
|
||||||
|
if [ "$1" = "--force" ]; then
|
||||||
|
printf "\nUpdating List, since --force was specified.\n"
|
||||||
|
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
|
||||||
|
update_es_urls
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then
|
if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then
|
||||||
printf "\nHashes match - no update needed.\n"
|
printf "\nHashes match - no update needed.\n"
|
||||||
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
|
printf "Current List: $CURRENT_LIST\nNew List: $NEW_LIST_JSON\n"
|
||||||
|
|||||||
@@ -425,7 +425,8 @@ post_to_2.4.5() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_to_2.4.10() {
|
post_to_2.4.10() {
|
||||||
echo "Nothing to apply"
|
echo "Updating Elastic Fleet ES URLs...."
|
||||||
|
/sbin/so-elastic-fleet-es-url-update --force
|
||||||
POSTVERSION=2.4.10
|
POSTVERSION=2.4.10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user