Set misp.org based on env var

pull/181/head
Stefano Ortolani 2024-11-07 14:09:19 +00:00
parent 7468cd9886
commit d9bfc19f77
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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