A script that gets the version of the agent.
Query if there is local_internal_options.conf, if it does not exist, create the file.
If the agent version is equal to 3.1 or higher, add to the file:
# Wazuh Command Module - If it should accept remote commands from the manager
wazuh_command.remote_commands=1
Regardless of the version, add to the file:
# Logcollector - If it should accept remote commands from the manager
logcollector.remote_commands=1
Finally, restart the agent.