new: [MISP fetcher] added to create an offline update package

pull/7931/head
iglocska 2021-11-05 07:43:13 +01:00
parent b3d9f4ca84
commit f0a75f08d2
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 32 additions and 0 deletions

14
tools/fetcher/README.md Normal file
View File

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

18
tools/fetcher/fetcher.sh Normal file
View File

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