From 89865531ffa7ee9e2cc19686b564c8d530036ad0 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Fri, 9 May 2025 11:41:16 +0200 Subject: [PATCH] Actualizar customizable_post_install.sh --- scripts/customizable_post_install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/customizable_post_install.sh b/scripts/customizable_post_install.sh index 7aa3e17..3b42ee9 100644 --- a/scripts/customizable_post_install.sh +++ b/scripts/customizable_post_install.sh @@ -1587,20 +1587,25 @@ install_lynis() { msg_info "$(translate "Cloning Lynis from GitHub...")" 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 >/dev/null 2>&1 - chmod +x /usr/local/bin/lynis >/dev/null 2>&1 + # Create wrapper script instead of symbolic link + cat << 'EOF' > /usr/local/bin/lynis +#!/bin/bash +cd /opt/lynis && ./lynis "$@" +EOF + chmod +x /usr/local/bin/lynis msg_ok "$(translate "Lynis installed successfully from GitHub")" else msg_warn "$(translate "Failed to clone Lynis from GitHub")" return 1 fi - if command -v lynis >/dev/null 2>&1; then + if /usr/local/bin/lynis show version >/dev/null 2>&1; then msg_success "$(translate "Lynis is ready to use")" else msg_warn "$(translate "Lynis installation could not be verified")" fi } +}