From 54705719de31342407e779042caf4fa579671dd1 Mon Sep 17 00:00:00 2001 From: Sebastiano Mariani Date: Thu, 17 Nov 2022 15:15:56 -0800 Subject: [PATCH] Add ability to specify new organizations that needs to be register at startup time (#5) Signed-off-by: Sebastiano Mariani --- server/files/entrypoint_internal.sh | 12 +++++++----- template.env | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server/files/entrypoint_internal.sh b/server/files/entrypoint_internal.sh index d347a7c..752aa0e 100755 --- a/server/files/entrypoint_internal.sh +++ b/server/files/entrypoint_internal.sh @@ -232,11 +232,13 @@ echo "Customize MISP | Configure plugins ..." && configure_plugins # Create organizations (and silently fail if present already) echo "Customize MISP | Creating organizations ..." -add_organization nuTAU true -add_organization CBTAU true -add_organization T-Rex true -add_organization NDR true -add_organization MDR true +SPLITTED_ORGS=$(echo $ORGANIZATIONS | tr ',' '\n') +for ORG in $SPLITTED_ORGS +do + echo "Adding organization: $ORG" + add_organization $ORG true +done + # Create sync servers for ID in $SYNCSERVERS; do diff --git a/template.env b/template.env index f634217..5c3cadb 100644 --- a/template.env +++ b/template.env @@ -19,3 +19,6 @@ SMARTHOST_PORT= SMARTHOST_USER= SMARTHOST_PASSWORD= SMARTHOST_ALIASES= + +# comma separated list of organizations to create (e.g ORGANIZATIONS="ORG1, ORG2, ORG3") +ORGANIZATIONS=