This file is indexed.

preinst is in mon 1.2.0-8.

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
#!/bin/sh
#
# Author: Dario Minnucci <midget@debian.org>
# Date:   Fri, 29 Jun 2007 00:28:43 +0200
#
#         'mon' user name availability is checked on install step.
#         'mon' group name availability is checked on install step.
#

set -e

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

add_user_if_needed () {

	#
	# Check if 'mon' user is already present in the system,
	# if not, then create 'mon' user and group.
	#
	if ! getent passwd mon >/dev/null; then

		echo -n "Creating user 'mon' ... "
		adduser \
			--gecos "mon daemon" \
			--quiet \
			--system \
			--group \
			--disabled-password \
			--home /var/lib/mon \
			mon
		echo "done."

	fi
}

case "$1" in
    install | upgrade)
	add_user_if_needed
	;;
esac