feat: configure tool using environment variables (#17)

Replace CLI parsing functionality with the `kingpin` library to better
support configuring the tool with environment variables.
Add new environment variables to configure the tool.

BREAKING CHANGE: CLI params now require two dashes instead of one (e.g. `--socket`)
This commit is contained in:
Hector
2022-01-30 21:32:48 +00:00
parent d92f7f79b6
commit b7e317edbc
5 changed files with 112 additions and 37 deletions

View File

@ -15,6 +15,6 @@ fi
# Start the exporter (use exec to support graceful shutdown)
# Inspired by: https://akomljen.com/stopping-docker-containers-gracefully/
exec /app/fail2ban-prometheus-exporter \
-socket "$socket_path" \
-collector.textfile=$textfile_enabled \
-collector.textfile.directory="$textfile_dir"
--socket "$socket_path" \
--collector.textfile=$textfile_enabled \
--collector.textfile.directory="$textfile_dir"