-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.sh
More file actions
executable file
·70 lines (60 loc) · 1.76 KB
/
main.sh
File metadata and controls
executable file
·70 lines (60 loc) · 1.76 KB
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
#!/bin/bash
# clear the screen
clear
echo ""
echo ""
# Display the name of the tool
figlet -t -f 3d "DATA" | lolcat
echo ""
# A border to cover the description and its centered
echo "=============================================================="
echo "Collect, Process, and Upload all the server data"
echo "=============================================================="
echo ""
# variables
RED='\033[0;31m'
NC='\033[0m' # No Color
DARK_GRAY='\033[1;30m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
# Display menu options
echo -e "1. Start ${DARK_GRAY}-| Collect, Process, and Upload at once${NC}"
echo -e "2. Collect ${DARK_GRAY}-| Collect your server logs${NC}"
echo -e "3. Process ${DARK_GRAY}-| Process your server logs${NC}"
echo -e "4. Upload ${DARK_GRAY}-| Upload your server logs to an AWS s3 Bucket${NC}"
echo -e "5. Automation ${DARK_GRAY}-| Configure the automated log processor${NC}"
echo -e "${GREEN}6. Go Back ${DARK_GRAY}-| Go back to the main menu${NC}"
echo -e "${RED}7. Exit ${DARK_GRAY}-| Exit the program${NC}"
echo -e "${NC}"
# Prompt the user for input
read -p "Choose an option (1-7): " choice
# Check the user's choice and execute the corresponding script
case $choice in
1)
./scripts/data/all.sh
;;
2)
./scripts/data/collection/main.sh
;;
3)
./scripts/data/process/main.sh
;;
4)
./scripts/data/upload/main.sh
;;
5)
./scripts/data/automation/main.sh
;;
6)
./main.sh
;;
7)
./exit.sh
;;
*)
echo -e "${RED}Invalid choice. Please choose a number between 1 and 7."
echo -e "${NC}"
sleep 1.5
exec ./scripts/data/main.sh
;;
esac