From cc2609659a213d956f617c51958ec58481ef28e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Tue, 29 Aug 2017 11:45:39 +0200 Subject: [PATCH] Workers and modules working properly. --- .gitignore | 1 + README.md | 4 ++-- misp.json | 2 +- scripts/bootstrap.sh | 19 ++++++++++++------- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 377b126..678c6e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ packer_cache/ output-virtualbox-iso/ +*.checksum diff --git a/README.md b/README.md index c644e29..09688ee 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ The sha1 and sha512 checksums of the generated VM will be stored in the files In case you encounter a problem with the ``MISP_BASEURL``, you can still change it when the VM is running. For example the IP address of your VM is -``172.16.100.123`` you cas set ``MISP_BASEURL`` from your host with the command: +``172.16.100.123`` you can set ``MISP_BASEURL`` from your host with the command: - $ ssh misp@172.16.100.123 sudo -u www-data /var/www/MISP/app/Console/cake Baseurl http://172.16.100.123/ + $ ssh misp@172.16.100.123 sudo -u www-data /var/www/MISP/app/Console/cake Baseurl http://172.16.100.123 If you want to build an image for VMWare you will need to install it and to use the VMWare builder with the command: diff --git a/misp.json b/misp.json index b34c1d6..e41ad90 100644 --- a/misp.json +++ b/misp.json @@ -2,7 +2,7 @@ "variables": { "ssh_name": "misp", "ssh_pass": "Password1234", - "hostname": "packer", + "hostname": "misp", "vm_name": "MISP_demo", "disk_size": "10000" }, diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 650da35..f65795b 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -320,13 +320,14 @@ fi sudo sed -i -e '$i \sudo -u www-data bash /var/www/MISP/app/Console/worker/start.sh\n' /etc/rc.local -# echo "\n--- Installing MISP modules... ---\n" -# sudo apt-get install -y python3-dev python3-pip libpq5 libjpeg-dev > /dev/null 2>&1 -# cd /usr/local/src/ -# sudo git clone https://github.com/MISP/misp-modules.git -# cd misp-modules -# sudo pip3 install -I -r REQUIREMENTS > /dev/null 2>&1 -# sudo pip3 install -I . > /dev/null 2>&1 +echo "\n--- Installing MISP modules... ---\n" +sudo apt-get install -y python3-dev python3-pip libpq5 libjpeg-dev > /dev/null 2>&1 +cd /usr/local/src/ +sudo git clone https://github.com/MISP/misp-modules.git +cd misp-modules +sudo pip3 install -I -r REQUIREMENTS > /dev/null 2>&1 +sudo pip3 install -I . > /dev/null 2>&1 +# With systemd: # sudo cat > /etc/systemd/system/misp-modules.service < /dev/null # sudo systemctl restart misp-modules.service > /dev/null +# With initd: +sudo sed -i -e '$i \sudo -u www-data misp-modules -l 0.0.0.0 -s &\n' /etc/rc.local + + echo "\n--- Restarting Apache... ---\n" sudo systemctl restart apache2 > /dev/null 2>&1