postinst is in ganglia-monitor 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 | #!/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 we have an old 2.5.x gmond
if [ -f /etc/gmond.conf ]; then
if [ ! -e /etc/ganglia/gmond.conf ]; then
gmond -r /etc/gmond.conf >/etc/ganglia/gmond.conf
else
gmond -r /etc/gmond.conf >/etc/ganglia/gmond.conf.old
fi
rm /etc/gmond.conf
fi
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/ganglia-monitor" ]; then
update-rc.d ganglia-monitor defaults >/dev/null
fi
if [ -x "/etc/init.d/ganglia-monitor" ] || [ -e "/etc/init/ganglia-monitor.conf" ]; then
invoke-rc.d ganglia-monitor start || exit $?
fi
fi
# End automatically added section
exit 0
|