Skip to content

Commit 1398cb9

Browse files
committed
style: modify style and colorization of output
1 parent 25f45b2 commit 1398cb9

1 file changed

Lines changed: 18 additions & 13 deletions

File tree

auditing/Lynis Installer/lynis-installer.bash

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,48 @@
55
# it. Unless an error is encountered, Lynis will always be downloaded to the current
66
# user's root directory (`/home/USERNAME/`).
77
#
8-
# Version: v1.0.7
8+
# Version: v1.0.8
99
# License: MIT License
1010
# Copyright (c) 2020-2024 Hunter T. (StrangeRanger)
1111
#
1212
########################################################################################
1313

1414
C_YELLOW="$(printf '\033[1;33m')"
1515
C_GREEN="$(printf '\033[0;32m')"
16+
C_BLUE="$(printf '\033[0;34m')"
1617
C_CYAN="$(printf '\033[0;36m')"
1718
C_RED="$(printf '\033[1;31m')"
1819
C_NC="$(printf '\033[0m')"
20+
21+
C_SUCCESS="${C_GREEN}==>${C_NC} "
1922
C_ERROR="${C_RED}ERROR:${C_NC} "
20-
C_WARNING="${C_YELLOW}WARNING:${C_NC} "
23+
C_WARNING="${C_YELLOW}==>${C_NC} "
24+
C_INFO="${C_BLUE}==>${C_NC} "
25+
C_NOTE="${C_CYAN}==>${C_NC} "
2126

2227

23-
read -rp "We will now download lynis. Press [Enter] to continue."
28+
read -rp "${C_NOTE}We will now download lynis. Press [Enter] to continue."
2429

25-
[[ -d "$HOME/lynis" ]] && {
30+
if [[ -d "$HOME/lynis" ]]; then
2631
echo "${C_WARNING}Lynis is already downloaded to your system" >&2
27-
echo "Current location: '$HOME/lynis'"
28-
echo -e "\nExiting..."
32+
echo "${C_NOTE} Current location: '$HOME/lynis'"
33+
echo -e "\n${C_INFO}Exiting..."
2934
exit 0
30-
}
35+
fi
3136

32-
echo "Changing working directory to '$HOME'..."
37+
echo "${C_INFO}Changing working directory to '$HOME'..."
3338
cd "$HOME" || {
3439
echo "${C_ERROR}Failed to change working directory to '$HOME'" >&2
3540
echo "${C_CYAN}Lynis will download to '$PWD'${C_NC}"
3641
}
3742

38-
echo "Downloading lynis..."
43+
echo "${C_INFO}Downloading lynis..."
3944
git clone https://github.com/CISOfy/lynis || {
4045
echo "${C_ERROR}Failed to download lynis" >&2
41-
echo -e "\nExiting..."
46+
echo -e "\n${C_INFO}Exiting..."
4247
exit 1
4348
}
4449

45-
echo -e "\n${C_GREEN}Lynis has been downloaded to your system"
46-
echo -e "${C_CYAN}To perform a system scan with lynis, execute the following command" \
47-
"in the lynis root directory: sudo ./lynis audit system${C_NC}"
50+
echo -e "\n${C_SUCCESS}Lynis has been downloaded to your system"
51+
echo -e "${C_NOTE}To perform a system scan with lynis, execute the following command" \
52+
"in the lynis root directory: sudo ./lynis audit system"

0 commit comments

Comments
 (0)