This commit is contained in:
Mike Reeves
2026-04-16 16:19:53 -04:00
parent 1ffdcab3be
commit a2ffb92b8d
+19 -12
View File
@@ -363,6 +363,8 @@ preupgrade_changes() {
echo "Checking to see if changes are 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 true
} }
@@ -371,6 +373,7 @@ postupgrade_changes() {
echo "Running post upgrade processes." echo "Running post upgrade processes."
[[ "$POSTVERSION" =~ ^2\.4\.21[0-9]+$ ]] && post_to_3.0.0 [[ "$POSTVERSION" =~ ^2\.4\.21[0-9]+$ ]] && post_to_3.0.0
[[ "$POSTVERSION" =~ 3.0.0 ]] && post_to_3.1.0
true true
} }
@@ -381,7 +384,7 @@ check_minimum_version() {
fi fi
} }
### 3.0.0 Scripts ### ### 3.0.0 Start ###
convert_suricata_yes_no() { convert_suricata_yes_no() {
echo "Starting suricata yes/no values to true/false conversion." echo "Starting suricata yes/no values to true/false conversion."
@@ -452,23 +455,27 @@ up_to_3.0.0() {
} }
post_to_3.0.0() { post_to_3.0.0() {
for idx in "logs-idh-so" "logs-redis.log-default"; do echo "Nothing to 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
POSTVERSION=3.0.0 POSTVERSION=3.0.0
} }
### 3.0.0 End ### ### 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() { repo_sync() {
echo "Sync the local repo." echo "Sync the local repo."
su socore -c '/usr/sbin/so-repo-sync' || fail "Unable to complete so-repo-sync." su socore -c '/usr/sbin/so-repo-sync' || fail "Unable to complete so-repo-sync."