This file is indexed.

postinst is in papercut 0.9.13-7.

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
75
76
77
78
79
80
#!/bin/sh

set -e

DATA_DIR="/var/lib/papercut"
MAILDIR_STORAGE_DIR="$DATA_DIR/maildirs"

case "$1" in
    configure)
        # Create a default test group for the mbox storage
        if [ ! -e "$DATA_DIR/.test_created" ]; then
	    mkdir -p "$MAILDIR_STORAGE_DIR/test/tmp"
	    mkdir -p "$MAILDIR_STORAGE_DIR/test/cur"
	    mkdir -p "$MAILDIR_STORAGE_DIR/test/new"
	    touch "$DATA_DIR/.test_created"
	fi
    ;;
    
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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


add_group_if_missing() {
    if [ -x /usr/sbin/addgroup ]; then
        if ! id -g papercut >/dev/null 2>&1; then
                addgroup --system --force-badname papercut || true
        fi
    fi
}

add_user_if_missing() {
    if [ -x /usr/sbin/adduser ]; then
        if ! id -u papercut > /dev/null 2>&1; then
            adduser --system --no-create-home \
		--disabled-password \
		--force-badname papercut \
		--ingroup papercut
        fi
    fi
}

create_pid_file(){
        if ! [ -d /var/run/papercut ]; then
		mkdir /var/run/papercut
                touch /var/run/papercut/papercut.pid
        fi
        chown papercut:papercut -R /var/run/papercut
}

add_group_if_missing
add_user_if_missing
create_pid_file


# Automatically added by dh_pysupport
if which update-python-modules >/dev/null 2>&1; then
	update-python-modules  papercut.dirs
fi
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/papercut" ]; then
	update-rc.d papercut defaults >/dev/null
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d papercut start || exit $?
	else
		/etc/init.d/papercut start || exit $?
	fi
fi
# End automatically added section


exit 0

# vim: set et sw=4