Skip to content

Commit

Permalink
Merge pull request #393 from 1stOfHisGame/inject_wazuh_cluster_key
Browse files Browse the repository at this point in the history
Updating Wazuh cluster key dynamically
  • Loading branch information
Manuel J. Bernal authored Oct 5, 2020
2 parents 3e63de9 + c78520b commit c3d89f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wazuh/config/00-wazuh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ function ossec_shutdown(){
##############################################################################
sed -i 's/<node_name>to_be_replaced_by_hostname<\/node_name>/<node_name>'"${HOSTNAME}"'<\/node_name>/g' ${WAZUH_INSTALL_PATH}/etc/ossec.conf

# Setting Wazuh cluster key
sed -i 's/<key>to_be_replaced_by_cluster_key<\/key>/<key>'"${WAZUH_CLUSTER_KEY}"'<\/key>/g' ${WAZUH_INSTALL_PATH}/etc/ossec.conf

# Trap exit signals and do a proper shutdown
trap "ossec_shutdown; exit" SIGINT SIGTERM

Expand Down

0 comments on commit c3d89f8

Please sign in to comment.