forked from pwnlandia/mhn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·78 lines (63 loc) · 2.03 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
if [ "$(whoami)" != "root" ]
then
echo "You must be root to run this script"
exit 1
fi
set -e
MHN_HOME=$(dirname "$0")
SCRIPTS="$MHN_HOME/scripts"
cd "$SCRIPTS"
echo "[`date`] Starting Installation of all MHN packages"
echo "[`date`] ========= Installing hpfeeds ========="
./install_hpfeeds.sh
echo "[`date`] ========= Installing menmosyne ========="
./install_mnemosyne.sh
echo "[`date`] ========= Installing Honeymap ========="
./install_honeymap.sh
echo "[`date`] ========= Installing MHN Server ========="
./install_mhnserver.sh
echo "[`date`] ========= MHN Server Install Finished ========="
echo ""
while true;
do
echo -n "Would you like to integrate with Splunk? (y/n) "
read SPLUNK
if [ "$SPLUNK" == "y" -o "$SPLUNK" == "Y" ]
then
echo -n "Splunk Forwarder Host: "
read SPLUNK_HOST
echo -n "Splunk Forwarder Port: "
read SPLUNK_PORT
echo "The Splunk Universal Forwarder will send all MHN logs to $SPLUNK_HOST:$SPLUNK_PORT"
./install_splunk_universalforwarder.sh "$SPLUNK_HOST" "$SPLUNK_PORT"
./install_hpfeeds-logger-splunk.sh
break
elif [ "$SPLUNK" == "n" -o "$SPLUNK" == "N" ]
then
echo "Skipping Splunk integration"
echo "The splunk integration can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./install_splunk_universalforwarder.sh <SPLUNK_HOST> <SPLUNK_PORT>"
echo " sudo ./install_hpfeeds-logger-splunk.sh"
break
fi
done
while true;
do
echo -n "Would you like to install ELK? (y/n) "
read ELK
if [ "$ELK" == "y" -o "$ELK" == "Y" ]
then
./install_elk.sh
break
elif [ "$ELK" == "n" -o "$ELK" == "N" ]
then
echo "Skipping ELK installation"
echo "The ELK installationg can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./install_elk.sh"
break
fi
done
echo "[`date`] Completed Installation of all MHN packages"