chg: [installer] Update installer

pull/4631/head
Steve Clement 2019-05-15 11:46:51 +09:00
parent d9339d608f
commit 09df8e982d
6 changed files with 32 additions and 11 deletions

View File

@ -520,7 +520,7 @@ setBaseURL () {
CONN=$(ip -br -o -4 a |grep UP |head -1 |tr -d "UP")
IFACE=`echo $CONN |awk {'print $1'}`
IP=`echo $CONN |awk {'print $2'}| cut -f1 -d/`
if [[ $(checkManufacturer) != "innotek GmbH" ]]; then
if [[ "$(checkManufacturer)" != "innotek GmbH" ]] && [[ "$(checkManufacturer)" != "VMware, Inc." ]]; then
debug "We guess that this is a physical machine and cannot possibly guess what the MISP_BASEURL might be."
if [[ "$UNATTENDED" != "1" ]]; then
echo "You can now enter your own MISP_BASEURL, if you wish to NOT do that, the MISP_BASEURL will be empty, which will work, but ideally you configure it afterwards."
@ -1080,6 +1080,12 @@ apacheConfig () {
debug "Generating Apache config"
sudo cp ${PATH_TO_MISP}/INSTALL/apache.24.misp.ssl /etc/apache2/sites-available/misp-ssl.conf
if [[ ! -z ${MISP_BASEURL} ]] && [[ "$(echo $MISP_BASEURL|cut -f 1 -d :)" == "http" || "$(echo $MISP_BASEURL|cut -f 1 -d :)" == "https" ]]; then
echo "Potentially replacing misp.local with $MISP_BASEURL in misp-ssl.conf"
fi
# If a valid SSL certificate is not already created for the server,
# create a self-signed certificate:
sudo openssl req -newkey rsa:4096 -days 365 -nodes -x509 \
@ -1417,6 +1423,7 @@ backgroundWorkers () {
debug "Setting up background workers"
# To make the background workers start on boot
sudo chmod +x $PATH_TO_MISP/app/Console/worker/start.sh
if [ ! -e /etc/rc.local ]
then
echo '#!/bin/sh -e' | sudo tee -a /etc/rc.local
@ -1424,14 +1431,28 @@ backgroundWorkers () {
sudo chmod u+x /etc/rc.local
fi
# Start the workers
$SUDO_WWW bash $PATH_TO_MISP/app/Console/worker/start.sh
echo "[Unit]
Description=MISP background workers
After=network.target
[Service]
Type=forking
User=${WWW_USER}
Group=${WWW_USER}
ExecStart=${PATH_TO_MISP}/app/Console/worker/start.sh
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/misp-workers.service
sudo systemctl daemon-reload
sudo systemctl enable --now misp-workers
# Add the following lines before the last line (exit 0). Make sure that you replace www-data with your apache user:
sudo sed -i -e '$i \echo never > /sys/kernel/mm/transparent_hugepage/enabled\n' /etc/rc.local
sudo sed -i -e '$i \echo 1024 > /proc/sys/net/core/somaxconn\n' /etc/rc.local
sudo sed -i -e '$i \sysctl vm.overcommit_memory=1\n' /etc/rc.local
sudo sed -i -e '$i \sudo -u www-data bash ${PATH_TO_MISP}/app/Console/worker/start.sh > /tmp/worker_start_rc.local.log\n' /etc/rc.local
}
# Main MISP Modules install function

View File

@ -1,5 +1,5 @@
; Generated by RHash v1.3.8 on 2019-05-15 at 11:41.54
; Generated by RHash v1.3.8 on 2019-05-15 at 11:46.40
; Written by Kravchenko Aleksey (Akademgorodok) - http://rhash.sf.net/
;
; 92869 11:41.54 2019-05-15 INSTALL.sh
INSTALL.sh 5BD994FACC7CEE48F69AB100B140CE0337A001C5 D3D8B2859C70FCA3834726BB09F961DC79DF86F0FA9A0589880F78019CFBA397 F20E746A5F8744F25D15C8BDD8091C83E51F53BB8B9B5D1EB3E77675F0ED20083E52D4620CCF9B8978C1C74D4C032B45 167D5AFB84F728191855C730E2F324AF7B41AFBA0403BE4208224AA3B06C036A40A2627E98CFCF5C7C0FFEAE827E77D41B72412098A74FA0669264C935A0D1D6
; 93318 11:46.39 2019-05-15 INSTALL.sh
INSTALL.sh 9A6CCD0CD7B9BF3422EDB983062721243D813859 0BD1EC3B295F381B205486DF2CA8B544B0645E17DEAE8451363E4E6073090341 1AC7E6DF057F43A5876801AC8564FC782DA603B551FB7EE790A61F2765C700FD1908E00FBD62AC2FD38D8657AEF81520 F5A25A1FFEC0CBD89C728EA009FF5EBDBAD36F386CAC244A5373B437480226DEBA1D86060D4772C521EDB0F04FA1B1077514E4D8A26564579FA2BDF6B2B8B6BD

View File

@ -1 +1 @@
5bd994facc7cee48f69ab100b140ce0337a001c5 INSTALL.sh
9a6ccd0cd7b9bf3422edb983062721243d813859 INSTALL.sh

View File

@ -1 +1 @@
d3d8b2859c70fca3834726bb09f961dc79df86f0fa9a0589880f78019cfba397 INSTALL.sh
0bd1ec3b295f381b205486df2ca8b544b0645e17deae8451363e4e6073090341 INSTALL.sh

View File

@ -1 +1 @@
f20e746a5f8744f25d15c8bdd8091c83e51f53bb8b9b5d1eb3e77675f0ed20083e52d4620ccf9b8978c1c74d4c032b45 INSTALL.sh
1ac7e6df057f43a5876801ac8564fc782da603b551fb7ee790a61f2765c700fd1908e00fbd62ac2fd38d8657aef81520 INSTALL.sh

View File

@ -1 +1 @@
167d5afb84f728191855c730e2f324af7b41afba0403be4208224aa3b06c036a40a2627e98cfcf5c7c0ffeae827e77d41b72412098a74fa0669264c935a0d1d6 INSTALL.sh
f5a25a1ffec0cbd89c728ea009ff5ebdbad36f386cac244a5373b437480226deba1d86060d4772c521edb0f04fa1b1077514e4d8a26564579fa2bdf6b2b8b6bd INSTALL.sh