This file is indexed.

postinst is in opendkim 2.9.1-1.

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

set -e

RUNDIR=/var/run/opendkim
USER=opendkim
GROUP=opendkim

if [ "$1" = "configure" ]; then
	if ! id -u opendkim >/dev/null 2>&1; then
		adduser --quiet --system --group --home /var/run/opendkim opendkim
	fi

        # Create the run directory if it doesn't exist
        if [ ! -d "$RUNDIR" ]; then
                install -o "$USER" -g "$GROUP" -m 755 -d "$RUNDIR" || return 2
                [ -x /sbin/restorecon ] && /sbin/restorecon "$RUNDIR"
        fi

	# Set ownership if the admin has not overriden it.
	if ! dpkg-statoverride --list /var/run/opendkim >/dev/null; then
		chown opendkim:opendkim /var/run/opendkim
	fi
fi

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


exit 0