Making the background workers start on boot.

pull/4/head
Cédric Bonhomme 2017-07-18 07:36:04 +02:00
parent 28664828c2
commit 35b179fd9c
No known key found for this signature in database
GPG Key ID: A1CB94DE57B7A70D
2 changed files with 18 additions and 8 deletions

View File

@ -9,13 +9,8 @@ TODO:
* check the generation of the SSL certificate;
* check the configuration of postfix;
* configure redis connection;
* make the background workers start on boot;
* generate the TLS certificate with Let's Encrypt.
Improvements:
* provide more options through variables (for the gpg keys, etc.).
Installation of VirtualBox and Vagrant

View File

@ -268,7 +268,7 @@ chmod -R 750 $PATH_TO_MISP/app/Config
echo -e "\n--- Generating a GPG encryption key... ---\n"
apt-get install rng-tools haveged
apt-get install -y rng-tools haveged
mkdir $PATH_TO_MISP/.gnupg
chmod 700 $PATH_TO_MISP/.gnupg
cat >gen-key-script <<EOF
@ -291,8 +291,23 @@ rm gen-key-script
gpg --homedir $PATH_TO_MISP/.gnupg --export --armor $EMAIL_ADDRESS > $PATH_TO_MISP/app/webroot/gpg.asc
# To make the background workers start on boot
# !!! TODO
echo -e "\n--- Making the background workers start on boot... ---\n"
chmod +x $PATH_TO_MISP/app/Console/worker/start.sh
cat > /etc/systemd/system/workers.service <<EOF
[Unit]
Description=Start the background workers at boot
[Service]
Type=oneshot
RemainAfterExit=yes
User=www-data
ExecStart=/bin/sh -c 'bash $PATH_TO_MISP/app/Console/worker/start.sh'
[Install]
WantedBy=multi-user.target
EOF
systemctl enable workers.service
systemctl restart workers.service
# echo -e "\n--- Enabling MISP new pub/sub feature (ZeroMQ)... ---\n"