chg: [doc] Added check for misp user if run twice…

pull/3483/head
Steve Clement 2018-07-13 17:37:02 +02:00
parent 63c3eaf1e2
commit 0c7f2989e5
1 changed files with 7 additions and 3 deletions

View File

@ -8,19 +8,23 @@
#1/ Prepare Kali with a MISP User
#--------------------------------
# To install MISP on Kali copy paste this in your r00t shell:
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/MISP/MISP/2.4/INSTALL/INSTALL.kali.txt)"
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/MISP/MISP/2.4/INSTALL/INSTALL.kali.txt)"
# /!\ Please read the installer script before randomly doing the above.
# The script is tested on a plain vanilla Kali Linux Boot CD and installs quite a few dependencies.
function kaliOnRootR0ckz () {
function kaliOnRootR0ckz() {
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
else
elif [[ $(id misp; echo $?) -ne 0 ]]
useradd -s /bin/bash -m -G adm,cdrom,sudo,dip,plugdev,www-data misp
passwd misp
su -m misp
cd ~misp
else
echo "User misp exists, skipping creation"
su -m misp
cd ~misp
fi
}