postinst is in queuegraph 1.1.1-3.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/sh
set -e
DATADIR=/var/lib/queuegraph
CACHEDIR=/var/cache/queuegraph
CGIDIR=/usr/lib/cgi-bin
case "$1" in
configure)
mkdir -p $DATADIR $CACHEDIR
chown root:root $DATADIR
chown www-data:www-data $CACHEDIR
chown root:root $CGIDIR/queuegraph.cgi
if [ -f $DATADIR/queuegraph.rrd ]; then
echo "RRD database already exists, skipping creation"
else
rrdtool create $DATADIR/queuegraph.rrd --step 60 \
DS:active:GAUGE:900:0:U \
DS:deferred:GAUGE:900:0:U \
RRA:AVERAGE:0.5:1:20160 \
RRA:AVERAGE:0.5:30:2016 \
RRA:AVERAGE:0.5:60:105120 \
RRA:MAX:0.5:1:1440 \
RRA:MAX:0.5:30:2016 \
RRA:MAX:0.5:60:105120
chmod 644 $DATADIR/queuegraph.rrd
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument $1" >&2
exit 1
;;
esac
exit 0
|