File tree 5 files changed +2
-33
lines changed
5 files changed +2
-33
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- red=' \033[0;31m'
3
- green=' \033[0;32m'
4
2
none=' \033[0m'
5
-
6
- safe_move () {
7
- if [ -e $2 /$1 ]; then
8
- echo -e " [UNIT 2 PROJECT] File $1 already found at $2 ."
9
- else
10
- if [ -e " $HOME /Files/wazuh-2/$1 " ]; then
11
- sudo mv ~ /Files/wazuh-2/" $1 " $2 /$1 && echo " [UNIT 2 PROJECT] Moved $1 to $2 /$1 "
12
- else
13
- echo -e " ${red} [UNIT 2 PROJECT]${none} Error: File ~/Files/wazuh-2/$1 does not exist."
14
- exit 1
15
- fi
16
- # Verify move was successful
17
- if ! [ -e $2 /$1 ]; then
18
- echo -e " ${red} [UNIT 2 PROJECT]${none} Error: Could not move file $1 to $2 /$1 "
19
- exit 1
20
- fi
21
- fi
22
- }
23
-
3
+ green=' \033[0;32m'
24
4
echo " [UNIT 2 PROJECT] Starting script..."
25
-
26
- sudo mkdir -p /etc/wazuh
27
- safe_move attack-part1 ~
28
- safe_move attack-part2 ~
29
- chmod u+x ~ /attack-part1
30
- chmod u+x ~ /attack-part2
31
- safe_move thisisit.txt /etc/wazuh
32
- safe_move static.txt /etc/wazuh
33
-
34
- echo -e " ${green} [UNIT 2 PROJECT]${none} All files moved successfully."
5
+ echo -e " ${green} [UNIT 2 PROJECT]${none} N/A - Nothing required for this project."
You can’t perform that action at this time.
0 commit comments