Created attachment 214993 [details] wazuh-agent-rc-script.patch Port does not have rc script for starting agent. The patch attached provides it.
Hi Felipe, nice work, thank you! Two things: : ${wazuh_agent_config:="/usr/local/etc/ossec-init.conf"} The port installs an init config in /var/ossec/etc/ossec.conf, can you point to ths one, please? Second: start_cmd="${name}_start" stop_cmd="${name}_stop" status_cmd="${name}_status" If you use the variable one could think when changing name everything is fine, but you function are not renamed if changing "name". I would just go for wazuh_agent_start etc. Opinions? Best, Michael
Hey Michael! Regarding "wazuh_agent_config", after adding the traditional stuff, the configuration file is not used by the agent at all. Initially I saw the warning when starting, but I guess as it is not used it can just be removed. Shall I remove of change it to the other name? Fixing the name variable.
Just remove it (ossec-control takes care of it) and adjust the variables :)
Created attachment 215025 [details] wazuh-agent-rc-script.patch Added proposed changes. Also added a documentation link after the package is installed.
Looks good, thank you :)
Is there something additional needed? I don't see it upstream (yet) to close this one.
A commit references this bug: Author: krion Date: Thu Jul 30 16:16:03 UTC 2020 New revision: 543803 URL: https://svnweb.freebsd.org/changeset/ports/543803 Log: Add RC script PR: 246822 Approved by: maintainer Changes: head/security/wazuh-agent/Makefile head/security/wazuh-agent/files/ head/security/wazuh-agent/files/wazuh-agent.in head/security/wazuh-agent/pkg-message