From f0a75f08d206fc89636ab694ba1b6d99063b2a95 Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 5 Nov 2021 07:43:13 +0100 Subject: [PATCH] new: [MISP fetcher] added to create an offline update package --- tools/fetcher/README.md | 14 ++++++++++++++ tools/fetcher/fetcher.sh | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tools/fetcher/README.md create mode 100644 tools/fetcher/fetcher.sh diff --git a/tools/fetcher/README.md b/tools/fetcher/README.md new file mode 100644 index 000000000..18658bc0f --- /dev/null +++ b/tools/fetcher/README.md @@ -0,0 +1,14 @@ +# MISP fetcher + +Simple shell script to generate a zip file containing MISP with all submodules and composer libraries. + +Simply run the script from its directory and use the zip's contents to update an airgapped MISP's codebase. + +You will need to have composer installed and accessible + +Assuming the standard MISP install path and www-data as your apache user, just run the following to update your MISP + +``` +unzip misp_flat.zip /var/www/MISP +chown -R www-data:www-data /var/www/MISP +``` diff --git a/tools/fetcher/fetcher.sh b/tools/fetcher/fetcher.sh new file mode 100644 index 000000000..de3c5f9dd --- /dev/null +++ b/tools/fetcher/fetcher.sh @@ -0,0 +1,18 @@ +# Stupid script to fetch MISP's install files including submodules and composer sourced libraries + +# This is currently a relative path, highly recommended to replace with an absolute path +# For example, if you want the fetcher to work in /foo/bar/baz, use "/foo/bar/baz/MISPflat" +MISP_FLAT_ROOT="MISPflat" + +git clone https://github.com/MISP/MISP.git $MISP_FLAT_ROOT +cd $MISP_FLAT_ROOT +git submodule update --init --recursive +cd .. +cd $MISP_FLAT_ROOT/app +composer install --no-dev +cd ../.. +cd $MISP_FLAT_ROOT +zip -r ../misp_flat.zip . +cd .. +rm -rf $MISP_FLAT_ROOT +