Browse Source

start and stop agent

merge-requests/75/head
Steven Foerster 5 years ago
parent
commit
d89aff602d
  1. 3
      scripts/services/Mistborn-wazuh.service
  2. 3
      scripts/services/wazuh/agent_start.sh
  3. 3
      scripts/services/wazuh/agent_stop.sh

3
scripts/services/Mistborn-wazuh.service

@ -16,8 +16,11 @@ ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-comp
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml up --build ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml up --build
# Agent install # Agent install
ExecStartPost=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent.sh ExecStartPost=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent.sh
ExecStartPost=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent_start.sh
# Stop container when unit is stopped # Stop container when unit is stopped
ExecStopPre=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh /opt/mistborn/scripts/services/wazuh/agent_stop.sh
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml down ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh docker-compose -f /opt/mistborn/extra/wazuh.yml down
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

3
scripts/services/wazuh/agent_start.sh

@ -0,0 +1,3 @@
#!/bin/bash
systemctl stop wazuh-agent

3
scripts/services/wazuh/agent_stop.sh

@ -0,0 +1,3 @@
#!/bin/bash
systemctl start wazuh-agent
Loading…
Cancel
Save