25 lines
420 B
Bash
Executable File
25 lines
420 B
Bash
Executable File
#!/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
|