Update customizable_post_install.sh

This commit is contained in:
MacRimi 2025-05-05 11:53:40 +02:00
parent f0dd00aa2c
commit f26572294f

View File

@ -1539,7 +1539,7 @@ EOF
install_lynis() { install_lynis_() {
msg_info2 "$(translate "Installing Lynis security scan tool...")" msg_info2 "$(translate "Installing Lynis security scan tool...")"
# Install Lynis directly from Debian repositories # Install Lynis directly from Debian repositories
@ -1571,6 +1571,36 @@ install_lynis() {
} }
install_lynis() {
msg_info2 "$(translate "Installing latest Lynis security scan tool...")"
if ! command -v git >/dev/null 2>&1; then
msg_info "$(translate "Installing Git as a prerequisite...")"
apt-get update
apt-get install -y git
fi
msg_info "$(translate "Cloning Lynis from GitHub...")"
if git clone https://github.com/CISOfy/lynis.git /opt/lynis 2>/dev/null; then
ln -sf /opt/lynis/lynis /usr/local/bin/lynis
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
msg_success "$(translate "Lynis is ready to use")"
else
msg_warn "$(translate "Lynis installation could not be verified")"
fi
}