diff --git a/README.rst b/README.rst index 0a59f5e..c27e64a 100644 --- a/README.rst +++ b/README.rst @@ -7,6 +7,7 @@ TODO: * check the GPG key generation; * check the generation of the SSL certificate; +* check the configuration of postfix * make the background workers start on boot; * apache.24.misp.ssl seems to be missing; * provide more options through variables (for the gpg keys, etc.). diff --git a/bootstrap.sh b/bootstrap.sh index c9ad814..1fcb3d8 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -25,6 +25,7 @@ OPENSSL_EMAILADDRESS='info@circl.lu' # GPG configuration GPG_REAL_NAME='Cedric' GPG_EMAIL_ADDRESS='info@circl.lu' +GPG_KEY_LENGTH='2048' GPG_PASSPHRASE='' @@ -154,12 +155,12 @@ chmod -R g+ws $PATH_TO_MISP/app/files/scripts/tmp echo -e "\n--- Creating a database user... ---\n" -mysql -u root -p$DBPASSWORD_AMIN -e "create database $DBNAME;" -mysql -u root -p$DBPASSWORD_AMIN -e "grant usage on *.* to $DBNAME@localhost identified by '$DBPASSWORD_MISP';" -mysql -u root -p$DBPASSWORD_AMIN -e "grant all privileges on $DBNAME.* to '$DBUSER_MISP'@'localhost';" -mysql -u root -p$DBPASSWORD_AMIN -e "flush privileges;" +mysql -u $DBUSER_AMIN -p$DBPASSWORD_AMIN -e "create database $DBNAME;" +mysql -u $DBUSER_AMIN -p$DBPASSWORD_AMIN -e "grant usage on *.* to $DBNAME@localhost identified by '$DBPASSWORD_MISP';" +mysql -u $DBUSER_AMIN -p$DBPASSWORD_AMIN -e "grant all privileges on $DBNAME.* to '$DBUSER_MISP'@'localhost';" +mysql -u $DBUSER_AMIN -p$DBPASSWORD_AMIN -e "flush privileges;" # Import the empty MISP database from MYSQL.sql -mysql -u misp -p$DBPASSWORD_MISP $DBNAME < /var/www/MISP/INSTALL/MYSQL.sql +mysql -u $DBUSER_MISP -p$DBPASSWORD_MISP $DBNAME < /var/www/MISP/INSTALL/MYSQL.sql echo -e "\n--- Configuring Apache... ---\n" @@ -204,7 +205,6 @@ cat > /etc/apache2/sites-available/misp-ssl.conf < EOF - # activate new vhost a2dissite default-ssl a2ensite misp-ssl @@ -218,7 +218,6 @@ echo -e "\n--- Configuring log rotation ---\n" cp $PATH_TO_MISP/INSTALL/misp.logrotate /etc/logrotate.d/misp - echo -e "\n--- MISP configuration ---\n" # There are 4 sample configuration files in /var/www/MISP/app/Config that need to be copied cat > $PATH_TO_MISP/app/Config/database.php <gen-key-script < $PATH_TO_MI # !!! TODO - - - echo -e "\n--- MISP is ready! ---\n" echo -e "\n--- Point your Web browser to http://127.0.0.1:5000 ---\n" echo -e "\n--- Default user/pass = admin@admin.test/admin ---\n"