From d9bfc19f777aacd826f4f044ffbee3beeec0f182 Mon Sep 17 00:00:00 2001 From: Stefano Ortolani Date: Thu, 7 Nov 2024 14:09:19 +0000 Subject: [PATCH] Set misp.org based on env var --- core/Dockerfile | 2 +- core/files/configure_misp.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/Dockerfile b/core/Dockerfile index 19d8b0d..d090a9e 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -78,7 +78,7 @@ FROM php-base AS php-build pecl install zstd && \ pecl install brotli - # install pect-text-ssdeep 1.2 + # install pecl-text-ssdeep 1.2 RUN git clone --recursive --depth=1 https://github.com/JakubOnderka/pecl-text-ssdeep.git /tmp/pecl-text-ssdeep RUN cd /tmp/pecl-text-ssdeep && phpize && ./configure && make && make install diff --git a/core/files/configure_misp.sh b/core/files/configure_misp.sh index a1512b3..73900ca 100755 --- a/core/files/configure_misp.sh +++ b/core/files/configure_misp.sh @@ -279,10 +279,13 @@ init_user() { echo "UPDATE $MYSQL_DATABASE.users SET email = \"${ADMIN_EMAIL}\" WHERE id = 1;" | ${MYSQL_CMD} if [ ! -z "$ADMIN_ORG" ]; then + echo "... setting admin org to '${ADMIN_ORG}'" echo "UPDATE $MYSQL_DATABASE.organisations SET name = \"${ADMIN_ORG}\" where id = 1;" | ${MYSQL_CMD} + sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "MISP.org" "${ADMIN_ORG}" fi if [ ! -z "$ADMIN_ORG_UUID" ]; then + echo "... setting admin org uuid to '${ADMIN_ORG_UUID}'" echo "UPDATE $MYSQL_DATABASE.organisations SET uuid = \"${ADMIN_ORG_UUID}\" where id = 1;" | ${MYSQL_CMD} fi