Wazuh: show the installer's own error when it fails

wazuh-install.sh writes everything to ~/wazuh-install.output, so a failed run left only "bash exited with status 1" in the log and the telemetry (8 runs in three days, three of them with the default resources). The end of that output now goes into the install log.
This commit is contained in:
MickLesk
2026-11-03 10:40:12 +01:00
parent d9abcadd01
commit c469d0d556
+5 -1
View File
@@ -21,7 +21,11 @@ msg_info "Setup Wazuh"
curl -fsSL https://packages.wazuh.com/$RELEASE/wazuh-install.sh -o wazuh-install.sh
chmod +x wazuh-install.sh
if [ "$STD" = "silent" ]; then
bash wazuh-install.sh -a >>~/wazuh-install.output
bash wazuh-install.sh -a >>~/wazuh-install.output || {
$STD tail -n 25 ~/wazuh-install.output
msg_error "The Wazuh installer failed, see its output above or in ~/wazuh-install.output"
exit 1
}
else
bash wazuh-install.sh -a | tee -a ~/wazuh-install.output
fi