Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a issue but my quick install script based on your build #8

Open
honey4free opened this issue Dec 8, 2016 · 0 comments
Open

Not a issue but my quick install script based on your build #8

honey4free opened this issue Dec 8, 2016 · 0 comments

Comments

@honey4free
Copy link

honey4free commented Dec 8, 2016

#!/bin/bash
#Env
service1="docker"
mysqlrootpw="something"
misp_mail="[email protected]"
misp_pgp_key="pgpkeypass"
misp_url_regex="https:\/\/fqdn"
misp_port="443"
#Somedir
cd /tmp/
function verify_docker
{
if [ "systemctl is-active $service1" != "active" ]
then
    echo "$SERVICE wasnt running so attempting restart"
    systemctl restart $service1
if [ "systemctl is-active $service1" != "active" ]
then
echo "Error with $service1"
exit 0
fi
fi
echo "$SERVICE is currently running"
}
function grabfiles
{
git clone https://github.com/xme/misp-docker
cd misp-docker
}
function docker_build
{
docker build -t misp/misp --build-arg MYSQL_ROOT_PASSWORD=$mysqlrootpw .
}
function create_config
{
rm -f env.txt
echo MYSQL_ROOT_PASSWORD=$mysqlrootpw >> env.txt
echo MYSQL_MISP_PASSWORD=$mysqlrootpw >> env.txt
echo MISP_ADMIN_EMAIL=$misp_mail >> env.txt
echo MISP_ADMIN_PASSPHRASE=$misp_pgp_key >> env.txt
echo MISP_BASEURL=$misp_url_regex >> env.txt
}
function start_misp
{
docker run -d -p $misp_port:443 -v /dev/urandom:/dev/random --env-file=env.txt --restart=always --name misp misp/misp
}
function clean_misp
{
echo "nothing cleaned"
}
function info_misp
{
echo "How to access the misp conteiner from shell"
echo "docker exec -it misp bash"
echo "How to change the admin password from the misp shell"
echo "/var/www/MISP/app/Console/cake Password [email protected] password"
}
verify_docker
grabfiles
docker_build
create_config
start_misp
clean_misp
info_misp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant