feat: add example systemd service file

Add a basic systemd service file to serve as an example on how to run the
exporter as a system service. Add short README with an overview of the
service file.
This commit is contained in:
Hector 2022-02-20 08:58:43 +00:00
parent b12ab669b1
commit 52d3648cb0
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# Systemd
The `.service` file in this directory is to be put into `/etc/systemd/system`.
It expects the binary file to be installed at `/usr/sbin/fail2ban_exporter`.
It expects a user named `fail2ban_exporter` to exist.
This user should not have a shell or any special privileges aside from read-access to the fail2ban socket file.
The `ExecStart` line can be modified to add any custom CLI flags.

View File

@ -0,0 +1,9 @@
[Unit]
Description=Fail2Ban Exporter
[Service]
User=fail2ban_exporter
ExecStart=/usr/sbin/fail2ban_exporter
[Install]
WantedBy=multi-user.target