mirror of https://github.com/MISP/MISP
chg: [installer] Updated script to use systemd for workers and modules
parent
7cd0bf012e
commit
bd87249551
|
@ -747,7 +747,6 @@ genRCLOCAL () {
|
|||
sed -i -e '$i \echo never > /sys/kernel/mm/transparent_hugepage/enabled\n' /etc/rc.local
|
||||
sed -i -e '$i \echo 1024 > /proc/sys/net/core/somaxconn\n' /etc/rc.local
|
||||
sed -i -e '$i \sysctl vm.overcommit_memory=1\n' /etc/rc.local
|
||||
sed -i -e '$i \sudo -u www-data bash /var/www/MISP/app/Console/worker/start.sh\n' /etc/rc.local
|
||||
}
|
||||
|
||||
# Final function to let the user know what happened
|
||||
|
@ -1266,7 +1265,7 @@ backgroundWorkers () {
|
|||
# Main MISP Modules install function
|
||||
mispmodules () {
|
||||
# FIXME: this is broken, ${PATH_TO_MISP} is litteral
|
||||
sudo sed -i -e '$i \sudo -u www-data /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1 -s > /tmp/misp-modules_rc.local.log &\n' /etc/rc.local
|
||||
##sudo sed -i -e '$i \sudo -u www-data /var/www/MISP/venv/bin/misp-modules -l 127.0.0.1 -s > /tmp/misp-modules_rc.local.log &\n' /etc/rc.local
|
||||
cd /usr/local/src/
|
||||
## TODO: checkUsrLocalSrc in main doc
|
||||
$SUDO_USER git clone https://github.com/MISP/misp-modules.git
|
||||
|
@ -1284,7 +1283,10 @@ mispmodules () {
|
|||
|
||||
# install additional dependencies for extended object generation and extraction
|
||||
$SUDO_WWW ${PATH_TO_MISP}/venv/bin/pip install wand yara pathlib
|
||||
# Start misp-modules
|
||||
# Start misp-modules as a service
|
||||
sudo cp etc/systemd/system/misp-modules.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now misp-modules
|
||||
$SUDO_WWW ${PATH_TO_MISP}/venv/bin/misp-modules -l 127.0.0.1 -s &
|
||||
|
||||
# Sleep 9 seconds to give misp-modules a chance to spawn
|
||||
|
@ -1976,9 +1978,11 @@ installMISPonKali () {
|
|||
debug "Setting up GnuPG"
|
||||
setupGnuPG 2> /dev/null > /dev/null
|
||||
|
||||
debug "Starting workers"
|
||||
debug "Adding workers to systemd"
|
||||
chmod +x $PATH_TO_MISP/app/Console/worker/start.sh
|
||||
$SUDO_WWW $PATH_TO_MISP/app/Console/worker/start.sh
|
||||
sudo cp $PATH_TO_MISP/INSTALL/misp-workers.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now misp-workers
|
||||
|
||||
debug "Running Core Cake commands"
|
||||
coreCAKE 2> /dev/null > /dev/null
|
||||
|
|
|
@ -543,9 +543,11 @@ installMISPonKali () {
|
|||
debug "Setting up GnuPG"
|
||||
setupGnuPG 2> /dev/null > /dev/null
|
||||
|
||||
debug "Starting workers"
|
||||
debug "Adding workers to systemd"
|
||||
chmod +x $PATH_TO_MISP/app/Console/worker/start.sh
|
||||
$SUDO_WWW $PATH_TO_MISP/app/Console/worker/start.sh
|
||||
sudo cp $PATH_TO_MISP/INSTALL/misp-workers.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now misp-workers
|
||||
|
||||
debug "Running Core Cake commands"
|
||||
coreCAKE 2> /dev/null > /dev/null
|
||||
|
|
|
@ -620,7 +620,6 @@ genRCLOCAL () {
|
|||
sed -i -e '$i \echo never > /sys/kernel/mm/transparent_hugepage/enabled\n' /etc/rc.local
|
||||
sed -i -e '$i \echo 1024 > /proc/sys/net/core/somaxconn\n' /etc/rc.local
|
||||
sed -i -e '$i \sysctl vm.overcommit_memory=1\n' /etc/rc.local
|
||||
sed -i -e '$i \sudo -u www-data bash /var/www/MISP/app/Console/worker/start.sh\n' /etc/rc.local
|
||||
}
|
||||
|
||||
# Final function to let the user know what happened
|
||||
|
|
Loading…
Reference in New Issue