Update customizable_post_install.sh

This commit is contained in:
MacRimi 2025-05-05 12:00:48 +02:00
parent f26572294f
commit a076dc5a58

View File

@ -1574,25 +1574,26 @@ install_lynis_() {
install_lynis() { install_lynis() {
msg_info2 "$(translate "Installing latest Lynis security scan tool...")" msg_info2 "$(translate "Installing latest Lynis security scan tool...")"
# Instalar Git si no está presente
if ! command -v git >/dev/null 2>&1; then if ! command -v git >/dev/null 2>&1; then
msg_info "$(translate "Installing Git as a prerequisite...")" msg_info "$(translate "Installing Git as a prerequisite...")"
apt-get update apt-get update -qq >/dev/null 2>&1
apt-get install -y git apt-get install -y git >/dev/null 2>&1
msg_ok "$(translate "Git installed")"
fi fi
# Clonar Lynis desde GitHub (oculto)
msg_info "$(translate "Cloning Lynis from GitHub...")" msg_info "$(translate "Cloning Lynis from GitHub...")"
if git clone https://github.com/CISOfy/lynis.git /opt/lynis 2>/dev/null; then if git clone --quiet https://github.com/CISOfy/lynis.git /opt/lynis >/dev/null 2>&1; then
ln -sf /opt/lynis/lynis /usr/local/bin/lynis ln -sf /opt/lynis/lynis /usr/local/bin/lynis >/dev/null 2>&1
chmod +x /usr/local/bin/lynis chmod +x /usr/local/bin/lynis >/dev/null 2>&1
msg_ok "$(translate "Lynis installed successfully from GitHub")" msg_ok "$(translate "Lynis installed successfully from GitHub")"
else else
msg_warn "$(translate "Failed to clone Lynis from GitHub")" msg_warn "$(translate "Failed to clone Lynis from GitHub")"
return 1 return 1
fi fi
# Verificación
if command -v lynis >/dev/null 2>&1; then if command -v lynis >/dev/null 2>&1; then
msg_success "$(translate "Lynis is ready to use")" msg_success "$(translate "Lynis is ready to use")"
else else
@ -1604,6 +1605,7 @@ install_lynis() {
# ========================================================== # ==========================================================