Date: Saturday, July 25, 2020 @ 16:08:57
  Author: jelle
Revision: 392531

Allow configuring cli arguments

Added:
  prometheus-memcached-exporter/trunk/prometheus-memcached-exporter.conf
Modified:
  prometheus-memcached-exporter/trunk/PKGBUILD
  prometheus-memcached-exporter/trunk/prometheus-memcached-exporter.service

---------------------------------------+
 PKGBUILD                              |   14 +++++++++-----
 prometheus-memcached-exporter.conf    |    2 ++
 prometheus-memcached-exporter.service |    3 ++-
 3 files changed, 13 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-07-25 11:27:28 UTC (rev 392530)
+++ PKGBUILD    2020-07-25 16:08:57 UTC (rev 392531)
@@ -2,16 +2,18 @@
 
 pkgname=prometheus-memcached-exporter
 pkgver=0.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Exports metrics from memcached servers for consumption by Prometheus"
 arch=('x86_64')
 url="https://github.com/prometheus/memcached_exporter";
 license=('Apache')
-depends=(glibc)
-makedepends=(go memcached)
-source=($pkgname-$pkgver.tar.gz::https://github.com/prometheus/memcached_exporter/archive/v${pkgver}.tar.gz
 prometheus-memcached-exporter.service)
+depends=(glibc memcached)
+makedepends=(go)
+source=($pkgname-$pkgver.tar.gz::https://github.com/prometheus/memcached_exporter/archive/v${pkgver}.tar.gz
 prometheus-memcached-exporter.service
+        prometheus-memcached-exporter.conf)
 
sha512sums=('5df59a73142e12c86bdc2da49627128c49a22a8bd380d3e44c091cb54c6d0f78d51fd3f95b884bd0260537f87b68989bfd24838abac21805c1b56506ef1bea82'
-            
'cf40ca9f2ea11e3d877314e54af963308fa256a981dd4bf03850367d44537b8d0f42f6934c61e6f38de35c88dcb9cec4433dc188cddb7f4d32964bf0cc837ede')
+            
'7af6ef9df784e97ecc08e77ee473b4b7860eb8a82c5af2a8cf1eec1850e71750e6d71bed1fa24744dc57c6b1dd6da31da1ec233056f29f9e58e64d5541af7280'
+            
'bc92af08207bee78a48cc764f038d6f5175b0051873f1238d90531f81d9b403085ec7ac62dfe934ee804794426c6bed4c309b374a418c9f7a4dbdbb157d58c23')
 
 check() {
   cd memcached_exporter-$pkgver
@@ -44,6 +46,8 @@
 
 package() {
   install -Dm644 prometheus-memcached-exporter.service 
"$pkgdir"/usr/lib/systemd/system/prometheus-memcached-exporter.service
+  install -Dm644 prometheus-memcached-exporter.conf 
"${pkgdir}"/etc/conf.d/prometheus-memcached-exporter
+
   cd memcached_exporter-$pkgver
   install -Dm755 memcached_exporter 
"$pkgdir"/usr/bin/prometheus-memcached-exporter
 }

Added: prometheus-memcached-exporter.conf
===================================================================
--- prometheus-memcached-exporter.conf                          (rev 0)
+++ prometheus-memcached-exporter.conf  2020-07-25 16:08:57 UTC (rev 392531)
@@ -0,0 +1,2 @@
+MEMCACHED_EXPORTER_ARGS=""
+

Modified: prometheus-memcached-exporter.service
===================================================================
--- prometheus-memcached-exporter.service       2020-07-25 11:27:28 UTC (rev 
392530)
+++ prometheus-memcached-exporter.service       2020-07-25 16:08:57 UTC (rev 
392531)
@@ -3,7 +3,8 @@
 After=network.target memcached.service
 
 [Service]
-ExecStart=/usr/bin/prometheus-memcached-exporter
+EnvironmentFile=-/etc/conf.d/prometheus-memcached-exporter
+ExecStart=/usr/bin/prometheus-memcached-exporter $MEMCACHED_EXPORTER_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
 DynamicUser=true
 

Reply via email to