mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
quote $API_RESULT
This commit is contained in:
@@ -60,7 +60,7 @@ register_agent() {
|
|||||||
GOT_KEY=$?
|
GOT_KEY=$?
|
||||||
|
|
||||||
if [[ -z "$AGENT_ID" || -z "$AGENT_KEY" || $GOT_ID -ne 0 || $GOT_KEY -ne 0 ]]; then
|
if [[ -z "$AGENT_ID" || -z "$AGENT_KEY" || $GOT_ID -ne 0 || $GOT_KEY -ne 0 ]]; then
|
||||||
if echo $API_RESULT | jq -er .message | grep -q "There is an agent with the same name"; then
|
if echo "$API_RESULT" | jq -er .message | grep -q "There is an agent with the same name"; then
|
||||||
echo "Agent $AGENT_NAME already registered!"
|
echo "Agent $AGENT_NAME already registered!"
|
||||||
touch /opt/so/conf/wazuh/initial_agent_registration.log
|
touch /opt/so/conf/wazuh/initial_agent_registration.log
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user