From 6e84227525ba1f17deb3cf2f70b8e59b0a282f6a Mon Sep 17 00:00:00 2001 From: TOoSmOotH Date: Wed, 16 Dec 2020 16:06:05 -0500 Subject: [PATCH] Add DB migration for thehive --- salt/common/tools/sbin/soup | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index a87279a0c..568cc85bc 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -340,6 +340,12 @@ space_check() { } +thehive_maint() { + echo "Migrating thehive databases if needed." + curl -v -k -XPOST -L "https://localhost/thehive/api/maintenance/migrate" + curl -v -k -XPOST -L "https://localhost/cortex/api/maintenance/migrate" +} + unmount_update() { cd /tmp umount /tmp/soagupdate @@ -602,6 +608,7 @@ echo "Running a highstate. This could take several minutes." salt-call state.highstate -l info queue=True playbook unmount_update +thehive_maint if [ "$UPGRADESALT" == "1" ]; then echo ""