#!/bin/bash ### # Shell script for registering agents automatically with the API # Copyright (C) 2017 Wazuh, Inc. All rights reserved. # Wazuh.com # # This program is a free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation. ### # Connection variables API_IP="10.0.0.1" API_PORT="55000" PROTOCOL="http" USER="foo" PASSWORD="bar" display_help() { cat < agent is not registered if ! [ "$AGENT_ID" -eq "$AGENT_ID" ] 2> /dev/null ; then echo "Starting registration process ..." : elif [[ "$FORCE" = true && "$SILENT" = "true" ]] ; then remove_agent > /dev/null 2>&1 else if [[ "$FORCE" = true ]] ; then remove_agent fi fi # Default action -> try to register the agent register_agent