Muehlenhoff has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393811 )
Change subject: Create prometheus user and switch systemd unit to it ...................................................................... Create prometheus user and switch systemd unit to it Change-Id: I54826261a27b28153fded1a60e24131722ec377a --- A debian/postinst M debian/service 2 files changed, 29 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/prometheus-openldap-exporter refs/changes/11/393811/1 diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..a43ff27 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +case "$1" in + configure) + # Add prometheus user + if ! getent passwd prometheus > /dev/null; then + adduser --quiet --system --no-create-home \ + --group --gecos "Prometheus daemon" prometheus || true + fi + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + : + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/service b/debian/service index 15eed16..418fd1d 100644 --- a/debian/service +++ b/debian/service @@ -3,7 +3,8 @@ ConditionPathExists=/etc/prometheus/openldap-exporter.yaml [Service] -Type=simple +Restart=always +User=prometheus ExecStart=/usr/bin/prometheus-openldap-exporter --config /etc/prometheus/openldap-exporter.yaml [Install] -- To view, visit https://gerrit.wikimedia.org/r/393811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54826261a27b28153fded1a60e24131722ec377a Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/prometheus-openldap-exporter Gerrit-Branch: master Gerrit-Owner: Muehlenhoff <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
