chg: [installer] Bump to latest version

pull/8216/head
Steve Clement 2022-03-07 14:40:36 +01:00
parent 6a41a0d7c8
commit 0f24d76669
No known key found for this signature in database
GPG Key ID: 69A20F509BE4AEE9
5 changed files with 16 additions and 83 deletions

View File

@ -916,7 +916,7 @@ installDeps () {
[[ -n $KALI ]] || [[ -n $UNATTENDED ]] && sudo DEBIAN_FRONTEND=noninteractive apt install -qy postfix || sudo apt install -qy postfix
sudo apt install -qy \
curl gcc git gnupg-agent make openssl redis-server neovim unzip zip libyara-dev python3-yara python3-redis python3-zmq sqlite3 \
curl gcc git gnupg-agent make openssl redis-server neovim unzip zip libyara-dev python3-yara python3-redis python3-zmq sqlite3 python3-virtualenv \
mariadb-client \
mariadb-server \
apache2 apache2-doc apache2-utils \
@ -926,74 +926,6 @@ installDeps () {
installRNG
}
# On Kali, the redis start-up script is broken. This tries to fix it.
fixRedis () {
# As of 20190124 redis-server init.d scripts are broken and need to be replaced
sudo mv /etc/init.d/redis-server /etc/init.d/redis-server_`date +%Y%m%d`
echo '#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
# Description: redis-server - Persistent key-value db
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/redis-server
DAEMON_ARGS=/etc/redis/redis.conf
NAME=redis-server
DESC=redis-server
PIDFILE=/var/run/redis.pid
test -x $DAEMON || exit 0
test -x $DAEMONBOOTSTRAP || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
touch $PIDFILE
chown redis:redis $PIDFILE
if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS
then
echo "$NAME."
else
echo "failed"
fi
;;
stop)
echo -n "Stopping $DESC: "
if start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
then
echo "$NAME."
else
echo "failed"
fi
rm -f $PIDFILE
;;
restart|force-reload)
${0} stop
${0} start
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0' | sudo tee /etc/init.d/redis-server
sudo chmod 755 /etc/init.d/redis-server
sudo /etc/init.d/redis-server start
}
# generate MISP apache conf
genApacheConf () {
echo "<VirtualHost _default_:80>
@ -1051,6 +983,11 @@ composer () {
${SUDO_WWW} sh -c "cd ${PATH_TO_MISP}/app ; php composer.phar install --no-dev"
}
# Legacy composer function
composer74 () {
sudo mkdir -p /var/www/.composer ; sudo chown ${WWW_USER}:${WWW_USER} /var/www/.composer
${SUDO_WWW} sh -c "cd ${PATH_TO_MISP}/app ; php7.4 composer.phar install --no-dev"
}
# TODO: FIX somehow the alias of the function does not work
# Composer on php 7.0 does not need any special treatment the provided phar works well
@ -1204,7 +1141,7 @@ checkSudoKeeper () {
installCoreDeps () {
debug "Installing core dependencies"
# Install the dependencies: (some might already be installed)
sudo apt-get install curl gcc git gpg-agent make python python3 openssl redis-server sudo vim zip unzip virtualenv libfuzzy-dev sqlite3 moreutils -qy
sudo apt-get install curl gcc git gpg-agent make python3 openssl redis-server sudo vim zip unzip virtualenv libfuzzy-dev sqlite3 moreutils -qy
# Install MariaDB (a MySQL fork/alternative)
sudo apt-get install mariadb-client mariadb-server -qy
@ -3262,9 +3199,6 @@ installMISPonKali () {
debug "Restarting mysql.service"
sudo systemctl restart mysql.service
debug "Fixing redis rc script on Kali"
fixRedis
debug "git clone, submodule update everything"
sudo mkdir ${PATH_TO_MISP}
sudo chown ${WWW_USER}:${WWW_USER} ${PATH_TO_MISP}
@ -3305,14 +3239,13 @@ installMISPonKali () {
cd ${PATH_TO_MISP}/app/files/scripts/python-stix
${SUDO_WWW} ${PATH_TO_MISP}/venv/bin/pip install .
debug "Install maec"
debug "Installing maec"
cd ${PATH_TO_MISP}/app/files/scripts/python-maec
${SUDO_WWW} ${PATH_TO_MISP}/venv/bin/pip install .
# install STIX2.0 library to support STIX 2.0 export
debug "Installing cti-python-stix2"
# install STIX2.0 library to support STIX 2.0 export:
cd ${PATH_TO_MISP}/cti-python-stix2
# Install misp-stix
debug "Installing misp-stix"
cd ${PATH_TO_MISP}/app/files/scripts/misp-stix
${SUDO_WWW} ${PATH_TO_MISP}/venv/bin/pip install .
debug "Installing mixbox"
@ -3340,7 +3273,7 @@ installMISPonKali () {
${SUDO_WWW} ${PATH_TO_MISP}/venv/bin/pip install zmq
debug "Installing cake"
composer
composer74
${SUDO_WWW} cp -fa ${PATH_TO_MISP}/INSTALL/setup/config.php ${PATH_TO_MISP}/app/Plugin/CakeResque/Config/config.php

View File

@ -1 +1 @@
cf8a8bbb37c4a135d8cc51166deed87be0d9a0dc INSTALL.sh
c14654d71a2a369fb5852987b69ecd7774b7111d INSTALL.sh

View File

@ -1 +1 @@
6bd696907b7e5b7fffb580cc4d67e21ec2b26ab816996a20e86bbad44ebbb207 INSTALL.sh
621dd7fc21cc25631248a685a00d506a3aa1c2e29c11539870cf4efde499dcc9 INSTALL.sh

View File

@ -1 +1 @@
1cbe736a73f717b322150ca3ab9142a909273ad7a970d45314357db0dfe86da33417a9970a188c201a0638c11864a128 INSTALL.sh
f348d5c019fea3c339b6076596ede2e55ea173cd1c25158d7e3d2cbb4d2d90950ac84ab3597bbaa50f199fd9850831db INSTALL.sh

View File

@ -1 +1 @@
20ecaf4a88f00c78f34ba66ee92fe8ef5c26de916969b0f36ff77b5187d01249f4f4e33210d578b41e06bf7a31dcc1c891c7229e4daf04f16953a46b440561c9 INSTALL.sh
499e82451509739bbd5117a942f8a39f847310301c9e4dc0428eaa31560ff6b08bafa958fd22c01a3241afad7fcfedfeb7ae88d25f5fce299e921b49a4d644c1 INSTALL.sh