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_dir=/app/textfile/
|
||||||
textfile_enabled=false
|
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)
|
# Start the exporter (use exec to support graceful shutdown)
|
||||||
# Inspired by: https://akomljen.com/stopping-docker-containers-gracefully/
|
# 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)
|
||||||
--socket "$socket_path" \
|
if [ -d $textfile_dir ]; then
|
||||||
--collector.textfile=$textfile_enabled \
|
exec /app/fail2ban-prometheus-exporter \
|
||||||
--collector.textfile.directory="$textfile_dir"
|
--socket "$socket_path" \
|
||||||
|
--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