This file is indexed.

postinst is in email-reminder 0.7.7-2.

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
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <postinst> `abort-remove'
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

. /usr/share/debconf/confmodule

CONFIG_FILE=/etc/email-reminder.conf

case "$1" in
    configure)
        # Create a restricted user to run send-reminders with
        adduser --system --disabled-login --shell /bin/false --no-create-home --home /var/spool/email-reminder --gecos 'Email-reminder mailer,,,' email-reminder || true

        # The config file can include the SMTP password so hide it
	touch $CONFIG_FILE
        chmod 600 $CONFIG_FILE
	chown email-reminder $CONFIG_FILE

	# Generate the config file
        echo "# WARNING: this file is automatically generated by debconf" > $CONFIG_FILE
        echo "# DO NOT edit directly or your changes will be lost" >> $CONFIG_FILE
        echo "# Instead, run 'dpkg-reconfigure email-reminder'" >> $CONFIG_FILE
        db_get email-reminder/send_reminders
        echo "send_reminders = ${RET}" >> $CONFIG_FILE
        db_get email-reminder/smtp_server
        echo "smtp_server = ${RET}" >> $CONFIG_FILE
        db_get email-reminder/smtp_username
        echo "smtp_username = ${RET}" >> $CONFIG_FILE
        db_get email-reminder/smtp_password
        echo "smtp_password = ${RET}" >> $CONFIG_FILE
        db_reset email-reminder/smtp_password
        db_get email-reminder/smtp_ssl
        echo "smtp_ssl = ${RET}" >> $CONFIG_FILE
        db_get email-reminder/mail_from
        echo "mail_from = ${RET}" >> $CONFIG_FILE

        # Create the spool directory for that user
        mkdir -p /var/spool/email-reminder
        chown email-reminder /var/spool/email-reminder/
        chmod 750 /var/spool/email-reminder/
    ;;

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

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

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section


exit 0