mirror of
				https://github.com/wazuh/wazuh-docker.git
				synced 2025-11-02 21:13:30 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			434 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			434 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
# Wazuh App Copyright (C) 2018 Wazuh Inc. (License GPLv2)
 | 
						|
#
 | 
						|
# Apply Templates
 | 
						|
#
 | 
						|
 | 
						|
set -e
 | 
						|
host="elasticsearch"
 | 
						|
until curl -XGET $host:9200; do
 | 
						|
  >&2 echo "Elastic is unavailable - sleeping"
 | 
						|
  sleep 1
 | 
						|
done
 | 
						|
 | 
						|
# Add logstash as command if needed
 | 
						|
if [ "${1:0:1}" = '-' ]; then
 | 
						|
	set -- logstash "$@"
 | 
						|
fi
 | 
						|
 | 
						|
# Run as user "logstash" if the command is "logstash"
 | 
						|
if [ "$1" = 'logstash' ]; then
 | 
						|
	set -- gosu logstash "$@"
 | 
						|
fi
 | 
						|
 | 
						|
exec "$@"
 |