prometheus/debian/postinst

25 lines
420 B
Plaintext
Raw Normal View History

2019-08-12 14:35:11 +02:00
#!/bin/sh
set -e
case "$1" in
configure)
# Add prometheus user
if ! getent passwd prometheus > /dev/null; then
adduser --quiet --system --home /var/lib/prometheus \
--group --gecos "Prometheus services" prometheus || true
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
:
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0