This file is indexed.

preinst is in postfix-cluebringer-webui 2.0.10-1ubuntu1.

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
#!/bin/sh -e

NAME=cluebringer

case "$1" in
	install)

		# Check that the system user and group exist, if not create them.
		if ! getent group $NAME >/dev/null ; then
			echo "Adding system group $NAME ... "
			addgroup --system --quiet $NAME || {
				
				if ! getent group $NAME >/dev/null ; then
						echo "Could not create system group $NAME." >&2
						exit 1;
				fi
			}
		fi

		if ! getent passwd $NAME >/dev/null ; then
			echo "Adding system user $NAME ... "
			adduser --system --home "/etc/$NAME" --ingroup "$NAME" \
			--no-create-home --disabled-login --shell "/usr/sbin/nologin" \
			--quiet $NAME >/dev/null 2>&1 || {
				
				if ! getent passwd $NAME >/dev/null ; then
						echo "Could not create system user $NAME." >&2
						exit 1;
				fi
			}
		fi

		if [ ! -f $LOGFILE ]; then
			touch $LOGFILE
			chown $NAME:adm $LOGFILE
		fi

		;;
	configure)
		;;
	upgrade|abort-upgrade)
		;;

	*)
		echo "preinst called with unknown argument $1" >&2
		exit 1
		;;
esac

exit 0