fix docker run file to use correct flags
This commit is contained in:
parent
1321aa92aa
commit
86d36221c2
@ -7,14 +7,15 @@ socket_path=/var/run/fail2ban/fail2ban.sock
|
||||
textfile_dir=/app/textfile/
|
||||
textfile_enabled=false
|
||||
|
||||
# Enable textfile metrics if the folder exists (i.e. was mounted by docker)
|
||||
if [ -d $textfile_dir ]; then
|
||||
textfile_enabled=true
|
||||
fi
|
||||
|
||||
# Start the exporter (use exec to support graceful shutdown)
|
||||
# Inspired by: https://akomljen.com/stopping-docker-containers-gracefully/
|
||||
exec /app/fail2ban-prometheus-exporter \
|
||||
# Enable textfile metrics if the folder exists (i.e. was mounted by docker)
|
||||
if [ -d $textfile_dir ]; then
|
||||
exec /app/fail2ban-prometheus-exporter \
|
||||
--socket "$socket_path" \
|
||||
--collector.textfile=$textfile_enabled \
|
||||
--collector.textfile.directory="$textfile_dir"
|
||||
--collector.textfile \
|
||||
--collector.textfile.directory "$textfile_dir"
|
||||
else
|
||||
exec /app/fail2ban-prometheus-exporter \
|
||||
--socket "$socket_path"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user