This file is indexed.

postinst is in twoftpd-run 1.41-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
#!/bin/sh
set -e

test "$1" = 'configure' || exit 0

getent passwd ftp >/dev/null || \
  adduser --system --home /var/ftp --no-create-home ftp
getent passwd ftplog >/dev/null || \
  adduser --system --home /nonexistent --no-create-home ftplog

READD=twoftpd
test -z "$2" || dpkg --compare-versions "$2" gt '1.21-4' || {
  update-service --remove /etc/twoftpd 2>/dev/null || :
  if update-service --check twoftpd-anon; then
    update-service --remove /etc/twoftpd-anon || :
    READD=twoftpd-anon
  fi
  sleep 6
  for i in twoftpd twoftpd-anon; do
    rm -rf /var/run/$i /var/run/$i.log
  done
}
update-service --add /etc/$READD

test -z "$2" || exit 0

# new install
chown ftplog:adm /var/log/twoftpd /var/log/twoftpd-anon
chmod 2750 /var/log/twoftpd /var/log/twoftpd-anon