This commit is contained in:
Mike Reeves
2026-04-16 16:19:53 -04:00
parent 1ffdcab3be
commit a2ffb92b8d
+20 -13
View File
@@ -362,7 +362,9 @@ preupgrade_changes() {
# This function is to add any new pillar items if needed.
echo "Checking to see if changes are needed."
[[ "$INSTALLEDVERSION" =~ ^2\.4\.21[0-9]+$ ]] && up_to_3.0.0
[[ "$INSTALLEDVERSION" =~ ^2\.4\.21[0-9]+$ ]] && up_to_3.0.0
[[ "$INSTALLEDVERSION" == 3.0.0 ]] && up_to_3.1.0
true
}
@@ -371,6 +373,7 @@ postupgrade_changes() {
echo "Running post upgrade processes."
[[ "$POSTVERSION" =~ ^2\.4\.21[0-9]+$ ]] && post_to_3.0.0
[[ "$POSTVERSION" =~ 3.0.0 ]] && post_to_3.1.0
true
}
@@ -381,7 +384,7 @@ check_minimum_version() {
fi
}
### 3.0.0 Scripts ###
### 3.0.0 Start ###
convert_suricata_yes_no() {
echo "Starting suricata yes/no values to true/false conversion."
@@ -452,23 +455,27 @@ up_to_3.0.0() {
}
post_to_3.0.0() {
for idx in "logs-idh-so" "logs-redis.log-default"; do
rollover_index "$idx"
done
# Remove ILM for so-case and so-detection indices
for idx in "so-case" "so-casehistory" "so-detection" "so-detectionhistory"; do
so-elasticsearch-query $idx/_ilm/remove -XPOST
done
# convert yes/no in suricata pillars to true/false
convert_suricata_yes_no
echo "Nothing to do"
POSTVERSION=3.0.0
}
### 3.0.0 End ###
### 3.1.0 Start ###
up_to_3.1.0() {
echo "Nothing to do"
INSTALLEDVERSION=3.1.0
}
post_to_3.1.0() {
echo "Nothing to do"
POSTVERSION=3.1.0
}
### 3.1.1 End ###
repo_sync() {
echo "Sync the local repo."
su socore -c '/usr/sbin/so-repo-sync' || fail "Unable to complete so-repo-sync."