mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Create symlink before registration otherwise registration script can't save it's state (.log) file into the conf subdir; add more logging output to track down registration failures
This commit is contained in:
@@ -55,8 +55,9 @@ register_agent() {
|
||||
# Adding agent and getting Id from manager
|
||||
echo ""
|
||||
echo "Adding agent:"
|
||||
echo "curl -s -u $USER:**** -k -X POST -d 'name=$AGENT_NAME&ip=$AGENT_IP' $PROTOCOL://$API_IP:$API_PORT/agents"
|
||||
echo "Executing: curl -s -u $USER:**** -k -X POST -d 'name=$AGENT_NAME&ip=$AGENT_IP' $PROTOCOL://$API_IP:$API_PORT/agents"
|
||||
API_RESULT=$(curl -s -u $USER:"$PASSWORD" -k -X POST -d 'name='$AGENT_NAME'&ip='$AGENT_IP -L $PROTOCOL://$API_IP:$API_PORT/agents)
|
||||
echo "Result: $API_RESULT"
|
||||
echo -e $API_RESULT | grep -q "\"error\":0" 2>&1
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
|
||||
@@ -128,15 +128,15 @@ whitelistmanager:
|
||||
- name: /usr/sbin/wazuh-manager-whitelist
|
||||
- cwd: /
|
||||
|
||||
/opt/so/conf/wazuh:
|
||||
file.symlink:
|
||||
- target: /nsm/wazuh/etc
|
||||
|
||||
wazuhagentservice:
|
||||
service.running:
|
||||
- name: wazuh-agent
|
||||
- enable: True
|
||||
|
||||
/opt/so/conf/wazuh:
|
||||
file.symlink:
|
||||
- target: /nsm/wazuh/etc
|
||||
|
||||
hidsruledir:
|
||||
file.directory:
|
||||
- name: /opt/so/rules/hids
|
||||
|
||||
Reference in New Issue
Block a user