From ba72e2d233f51ea02353768331de7bff4a041542 Mon Sep 17 00:00:00 2001 From: Steven Goossens Date: Fri, 8 Nov 2024 17:32:22 +0100 Subject: [PATCH] Update configure_misp.sh - Add uuid to database --- core/files/configure_misp.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/files/configure_misp.sh b/core/files/configure_misp.sh index 0f96f27..3f2b722 100755 --- a/core/files/configure_misp.sh +++ b/core/files/configure_misp.sh @@ -282,6 +282,10 @@ init_user() { echo "UPDATE $MYSQL_DATABASE.organisations SET name = \"${ADMIN_ORG}\" where id = 1;" | ${MYSQL_CMD} fi + if [ ! -z "$ADMIN_ORG_UUID" ]; then + echo "UPDATE $MYSQL_DATABASE.organisations SET uuid = \"${ADMIN_ORG_UUID}\" where id = 1;" | ${MYSQL_CMD} + fi + if [ -n "$ADMIN_KEY" ]; then echo "... setting admin key to '${ADMIN_KEY}'" CHANGE_CMD=(sudo -u www-data /var/www/MISP/app/Console/cake User change_authkey 1 "${ADMIN_KEY}")