This file is indexed.

postinst is in mon 1.2.0-4.

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
46
47
48
49
50
51
52
53
54
#!/bin/sh
#
# Author: Dario Minnucci <midget@debian.org>
# Date:   Fri, 29 Jun 2007 02:51:52 +0200
#
#         'mon' user creation in configure step.
#

set -e

#echo "----------------------------------------------"
#echo " debian/mon.postinst: $1"
#echo "----------------------------------------------"

case "$1" in
    configure)

	chown mon:root "/var/log/mon"

	#
	# Check if pidfile directory already exists and change ownership"
	#
	if [ -d "/var/run/mon" ] ; then
		############################################################
		# Compativility with versions older than 0.99.2-12:
		############################################################
		# On previous versions, /var/run/mon directory ownership was 
		# set to 'daemon:root' in order to manage the pidfile.
		# With the introduction of the user 'mon', the init script
		# switches to user 'mon' before starting the daemon startup
		# process. Because of this, we need to change the directory
		# ownership to ensure the pidfile is created.
		############################################################
		chown mon:root "/var/run/mon"
	fi 
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/mon" ]; then
	if [ ! -e "/etc/init/mon.conf" ]; then
		update-rc.d mon defaults >/dev/null
	fi
	invoke-rc.d mon start || exit $?
fi
# End automatically added section