postinst is in gmetad 3.6.0-6ubuntu4.
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 | #!/bin/sh
set -e
if ! getent passwd ganglia >/dev/null; then
echo Adding system user: ganglia.
useradd -r -c "Ganglia Monitor" -d "/var/lib/ganglia" -s "/bin/false" -U ganglia
fi
if [ ! -d /var/lib/ganglia/rrds ]; then
mkdir -p /var/lib/ganglia/rrds
fi
if [ -d /var/lib/ganglia/rrds ]; then
chown ganglia:ganglia /var/lib/ganglia
chown -R nobody /var/lib/ganglia/rrds
chmod 0755 /var/lib/ganglia
chmod -R o-w /var/lib/ganglia/rrds
fi
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/gmetad" ]; then
update-rc.d gmetad defaults >/dev/null
fi
if [ -x "/etc/init.d/gmetad" ] || [ -e "/etc/init/gmetad.conf" ]; then
invoke-rc.d gmetad start || exit $?
fi
fi
# End automatically added section
exit 0
|