postinst is in graphite-api 1.1.2-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/sh
set -e
DIRS="/var/log/graphite-api /var/lib/graphite-api"
if [ "$1" = "configure" ]; then
# This use is shared with graphite-web
adduser --system --quiet --home /var/lib/graphite --no-create-home \
--shell /bin/false --force-badname --group --gecos "Graphite User" _graphite
for i in $DIRS; do
mkdir -m 0755 -p $i
if ! dpkg-statoverride --list $i >/dev/null 2>&1; then
dpkg-statoverride --update --add _graphite _graphite 0755 $i
fi
done
fi
# Automatically added by dhpython:
if which py3compile >/dev/null 2>&1; then
py3compile -p graphite-api
fi
# End automatically added section
|