forked from wazuh/wazuh-docker
Add wazuh image using filebeat-oss
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# Wazuh App Copyright (C) 2020 Wazuh Inc. (License GPLv2)
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$ELASTICSEARCH_URL" != "" ]; then
|
||||
>&2 echo "Customize Elasticsearch ouput IP"
|
||||
sed -i 's|http://elasticsearch:9200|'$ELASTICSEARCH_URL'|g' /etc/filebeat/filebeat.yml
|
||||
fi
|
||||
|
||||
# Configure filebeat.yml security settings
|
||||
|
||||
if [ "$SSL_CERTIFICATE_AUTHORITIES" != "" ]; then
|
||||
>&2 echo "Configuring Certificate Authorities."
|
||||
sed -i 's|#ssl.certificate_authorities:|'ssl.certificate_authorities:\ [\"$SSL_CERTIFICATE_AUTHORITIES\"]'|g' /etc/filebeat/filebeat.yml
|
||||
fi
|
||||
|
||||
if [ "$USERNAME" != "" ]; then
|
||||
>&2 echo "Configuring username."
|
||||
sed -i 's|#username:|'username:\ \"$USERNAME\"'|g' /etc/filebeat/filebeat.yml
|
||||
fi
|
||||
|
||||
if [ "$PASSWORD" != "" ]; then
|
||||
>&2 echo "Configuring password."
|
||||
sed -i 's|#password:|'password:\ \"$PASSWORD\"'|g' /etc/filebeat/filebeat.yml
|
||||
fi
|
||||
|
||||
chmod go-w /etc/filebeat/filebeat.yml || true
|
||||
chown root: /etc/filebeat/filebeat.yml || true
|
||||
Reference in New Issue
Block a user