diff --git a/examples/systemd/README.md b/examples/systemd/README.md new file mode 100644 index 0000000..e6efcbf --- /dev/null +++ b/examples/systemd/README.md @@ -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. diff --git a/examples/systemd/fail2ban_exporter.service b/examples/systemd/fail2ban_exporter.service new file mode 100644 index 0000000..db1cf68 --- /dev/null +++ b/examples/systemd/fail2ban_exporter.service @@ -0,0 +1,9 @@ +[Unit] +Description=Fail2Ban Exporter + +[Service] +User=fail2ban_exporter +ExecStart=/usr/sbin/fail2ban_exporter + +[Install] +WantedBy=multi-user.target \ No newline at end of file