This file is indexed.

postinst is in tinyhoneypot 0.4.6-10.

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
#!/bin/sh
# Postint script for tinyhoneypot

set -e 
# New user to create
NUSER=thpot
# User the group belongs to
NUSERGROUP=nogroup
# HOME directory for the user
NUHOME=/usr/share/thpot

case "$1" in
    configure)
        if ! getent passwd | grep -q "^$NUSER:"; then
          adduser --quiet --system --home $NUHOME \
                        --gecos "TinyHoneypot" \
                        --gecos "Honeypot user" \
                        --disabled-login \
                        --disabled-password \
                        --no-create-home \
                        --home $NUHOME \
                        --ingroup $NUSERGROUP \
                        --shell /dev/null \
                        $NUSER 
        fi
        # Setup the log directory
	# TODO: maybe do this only once (if the directory belongs to
	# root and the user has just been created)
        chown -R $NUSER:root /var/log/thpot
	chmod -R o-rwX /var/log/thpot
    ;;

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

    ;;

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



exit 0