We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#!/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
systemctl is-active $service1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#!/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
The text was updated successfully, but these errors were encountered: