This file is indexed.

postinst is in popa3d 1.0.3-1build1.

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
55
56
57
58
59
60
61
62
63
#!/bin/sh
# post-installation script for popa3d

set -e

umask 022
# Source the debconf library.
. /usr/share/debconf/confmodule


update_defaults()
{
    db_get popa3d/standalone
    if [ "$RET" = "true" ]; then
	RUN_STANDALONE="yes"
	# Remove service from /etc/inetd.conf
	update-inetd --pattern "popa3d" --remove pop3
    else
	RUN_STANDALONE="no"
	pidof popa3d && /etc/init.d/popa3d stop
        # Add service to /etc/inetd.conf
        update-inetd --group MAIL --add 'pop3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/popa3d'
    fi
    
    if [ -e /etc/default/popa3d ]; then
	sed -e "s/^RUN_STANDALONE=.*/RUN_STANDALONE=$RUN_STANDALONE/g" </etc/default/popa3d >$TMPFILE && mv -f $TMPFILE /etc/default/popa3d
    else
	cat > /etc/default/popa3d <<EOF
# Automatically generated, edit by dpkg-reconfigure popa3d
RUN_STANDALONE=$RUN_STANDALONE
EOF
    fi

}

TMPFILE=`tempfile`
if [ $? -ne 0 ]; then
	echo "$0: Can't create temp file, exiting..."
	exit 1
fi

# adding popa3d group & user
getent group popa3d > /dev/null 2>&1 || addgroup --system popa3d
getent passwd popa3d > /dev/null 2>&1 || adduser --system --home /var/lib/popa3d --ingroup popa3d popa3d

# /var/lib/popa3d should be created by package
chown root:root /var/lib/popa3d
chmod 755 /var/lib/popa3d     

update_defaults

# Automatically added by dh_installinit/11.1.6ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "/etc/init.d/popa3d" ]; then
		update-rc.d popa3d defaults >/dev/null
		invoke-rc.d popa3d start || exit 1
	fi
fi
# End automatically added section



db_stop