fix: adapt systemd unit to load environment file with extra args

This commit is contained in:
Markus Pesch 2023-06-10 10:52:49 +02:00
parent d2f1a5560f
commit 8f0116dc98
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
4 changed files with 17 additions and 12 deletions

View File

@ -1,7 +1,7 @@
pkgbase = prometheus-fail2ban-exporter pkgbase = prometheus-fail2ban-exporter
pkgdesc = Fail2Ban exporter for Fail2Ban metrics pkgdesc = Fail2Ban exporter for Fail2Ban metrics
pkgver = 0.7.2 pkgver = 0.7.2
pkgrel = 3 pkgrel = 4
url = https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter url = https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
arch = x86_64 arch = x86_64
license = MIT license = MIT
@ -12,12 +12,12 @@ pkgbase = prometheus-fail2ban-exporter
source = systemd.service source = systemd.service
source = sysusers.conf source = sysusers.conf
sha512sums = b7691cc31c747965b8ac9e8f818d4411b716888be5c84c51bbe5e206022bf9b60f95abddc37c8011a412a40ba0665107e957a55b3acba5018fd5be85c442380e sha512sums = b7691cc31c747965b8ac9e8f818d4411b716888be5c84c51bbe5e206022bf9b60f95abddc37c8011a412a40ba0665107e957a55b3acba5018fd5be85c442380e
sha512sums = 7f0a0770ac6f42a7bc0d6e38559da833b7cbc18f97c516418d596878537c12b5778e2705a451e16f3067ceb87ce60af2a705867b0962f7abd1a595a23902a3ba sha512sums = 681a744d7a7d7825d857b5d14ea19fefe0302de2d98fa76a2442335ecc7cf4cf2dfd03aa8fe9b3356544ef29b0823279a3810c78eabbf8be6c88a0a71f509967
sha512sums = 7918ea56dc94b29e25900d5bcf94c8c525226d5a490124b718686aa3c8900752baae80722c8c840d563c1ffef06a54440802cff498c9edf0c673d682518a3f1a sha512sums = f9f85bdd72d6f8bcb17732bb954c2ff0c19dfcfcdce6751713f0905f6405eb34cf211b974311217ca60dabb6fa274ec26799f43432c2ad63284a2894dda12092
sha512sums = c070f57c58f367421835fe757b6b46e4c6cc3a69e0e927b10c229daab945fc52e57acdf25a84f04f752cb7304c40c2ff95e7987daf41c80f8857d409def1752f sha512sums = c070f57c58f367421835fe757b6b46e4c6cc3a69e0e927b10c229daab945fc52e57acdf25a84f04f752cb7304c40c2ff95e7987daf41c80f8857d409def1752f
b2sums = 87ab07b334594ecb792d817abb9bca1c7565be64df79d6dfa5edd268241534345a9e7e5b782dfcfd623d6a63db77b8803c614e44c3d44f9b7ca6b41952c6eb20 b2sums = 87ab07b334594ecb792d817abb9bca1c7565be64df79d6dfa5edd268241534345a9e7e5b782dfcfd623d6a63db77b8803c614e44c3d44f9b7ca6b41952c6eb20
b2sums = cd565b9262d85399ba63290d5af32fed23227d4a987499968654d4f0f7ea95c91c7781cae513d4368a87de328ac198a5e05cf5beae9199ebbdfb622c098281b9 b2sums = 3d6adfad59d88ff99b1e4f924651746e62e562fefa0360f02fe1091e920b0bb74e4f54930ff1f863b9004a490e90c78dc92d16ca234b5b536315b7fd45cbf4e4
b2sums = e88ba4beef23dfd36a825f6b873647708b81a35d4b2debb16f0a5e35e5e42311ebd9694cb90501d65231c1ae45c863103fe93ae1f6c99c2745ed7e8c12434653 b2sums = 0334daf62d9980a8165f8701041af27889e5501cba3d5790fdae03a812d6fd3a48b6d9dcf67bd25fb56ac762d9332f27c7e4ea08c56b0f5e657268caf7018ee8
b2sums = 4b731a290e1ad967f9e7708b00d4b9279bdbc57461c62d09a8bff00958e72cb8e69848d73af486bcc9e58ffe1e087ca86dc2625770a25ebd47e41d7bba193bef b2sums = 4b731a290e1ad967f9e7708b00d4b9279bdbc57461c62d09a8bff00958e72cb8e69848d73af486bcc9e58ffe1e087ca86dc2625770a25ebd47e41d7bba193bef
pkgname = prometheus-fail2ban-exporter pkgname = prometheus-fail2ban-exporter

View File

@ -3,7 +3,7 @@
pkgname=prometheus-fail2ban-exporter pkgname=prometheus-fail2ban-exporter
_pkgname=fail2ban-prometheus-exporter _pkgname=fail2ban-prometheus-exporter
pkgver=0.7.2 pkgver=0.7.2
pkgrel=3 pkgrel=4
pkgdesc="Fail2Ban exporter for Fail2Ban metrics" pkgdesc="Fail2Ban exporter for Fail2Ban metrics"
arch=('x86_64') arch=('x86_64')
url="https://gitlab.com/hectorjsmith/$_pkgname" url="https://gitlab.com/hectorjsmith/$_pkgname"
@ -17,12 +17,12 @@ source=(
'sysusers.conf' 'sysusers.conf'
) )
sha512sums=('b7691cc31c747965b8ac9e8f818d4411b716888be5c84c51bbe5e206022bf9b60f95abddc37c8011a412a40ba0665107e957a55b3acba5018fd5be85c442380e' sha512sums=('b7691cc31c747965b8ac9e8f818d4411b716888be5c84c51bbe5e206022bf9b60f95abddc37c8011a412a40ba0665107e957a55b3acba5018fd5be85c442380e'
'7f0a0770ac6f42a7bc0d6e38559da833b7cbc18f97c516418d596878537c12b5778e2705a451e16f3067ceb87ce60af2a705867b0962f7abd1a595a23902a3ba' '681a744d7a7d7825d857b5d14ea19fefe0302de2d98fa76a2442335ecc7cf4cf2dfd03aa8fe9b3356544ef29b0823279a3810c78eabbf8be6c88a0a71f509967'
'7918ea56dc94b29e25900d5bcf94c8c525226d5a490124b718686aa3c8900752baae80722c8c840d563c1ffef06a54440802cff498c9edf0c673d682518a3f1a' 'f9f85bdd72d6f8bcb17732bb954c2ff0c19dfcfcdce6751713f0905f6405eb34cf211b974311217ca60dabb6fa274ec26799f43432c2ad63284a2894dda12092'
'c070f57c58f367421835fe757b6b46e4c6cc3a69e0e927b10c229daab945fc52e57acdf25a84f04f752cb7304c40c2ff95e7987daf41c80f8857d409def1752f') 'c070f57c58f367421835fe757b6b46e4c6cc3a69e0e927b10c229daab945fc52e57acdf25a84f04f752cb7304c40c2ff95e7987daf41c80f8857d409def1752f')
b2sums=('87ab07b334594ecb792d817abb9bca1c7565be64df79d6dfa5edd268241534345a9e7e5b782dfcfd623d6a63db77b8803c614e44c3d44f9b7ca6b41952c6eb20' b2sums=('87ab07b334594ecb792d817abb9bca1c7565be64df79d6dfa5edd268241534345a9e7e5b782dfcfd623d6a63db77b8803c614e44c3d44f9b7ca6b41952c6eb20'
'cd565b9262d85399ba63290d5af32fed23227d4a987499968654d4f0f7ea95c91c7781cae513d4368a87de328ac198a5e05cf5beae9199ebbdfb622c098281b9' '3d6adfad59d88ff99b1e4f924651746e62e562fefa0360f02fe1091e920b0bb74e4f54930ff1f863b9004a490e90c78dc92d16ca234b5b536315b7fd45cbf4e4'
'e88ba4beef23dfd36a825f6b873647708b81a35d4b2debb16f0a5e35e5e42311ebd9694cb90501d65231c1ae45c863103fe93ae1f6c99c2745ed7e8c12434653' '0334daf62d9980a8165f8701041af27889e5501cba3d5790fdae03a812d6fd3a48b6d9dcf67bd25fb56ac762d9332f27c7e4ea08c56b0f5e657268caf7018ee8'
'4b731a290e1ad967f9e7708b00d4b9279bdbc57461c62d09a8bff00958e72cb8e69848d73af486bcc9e58ffe1e087ca86dc2625770a25ebd47e41d7bba193bef') '4b731a290e1ad967f9e7708b00d4b9279bdbc57461c62d09a8bff00958e72cb8e69848d73af486bcc9e58ffe1e087ca86dc2625770a25ebd47e41d7bba193bef')
build() { build() {

View File

@ -1 +1,6 @@
PROMETHEUS_FAIL2BAN_EXPORTER_EXTRA_ARGS="" # F2B_COLLECTOR_SOCKET=""
# F2B_COLLECTOR_TEXT_PATH=""
# F2B_WEB_LISTEN_ADDRESS=""
# F2B_WEB_BASICAUTH_USER=""
# F2B_WEB_BASICAUTH_PASS=""
# F2B_EXIT_ON_SOCKET_CONN_ERROR=""

View File

@ -5,7 +5,7 @@ After=network-online.target
[Service] [Service]
EnvironmentFile=/etc/conf.d/prometheus-fail2ban-exporter EnvironmentFile=/etc/conf.d/prometheus-fail2ban-exporter
ExecStart=/usr/bin/prometheus-fail2ban-exporter ${PROMETHEUS_FAIL2BAN_EXPORTER_EXTRA_ARGS} ExecStart=/usr/bin/prometheus-fail2ban-exporter
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
User=root User=root
Group=root Group=root