This file is indexed.

postinst is in xrdp 0.6.1-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
#!/bin/sh -e

if ! ([ "$1" = "configure" ] || [ "$1" = "reconfigure" ]); then
  exit 0
fi


XRDP="xrdp"
CHOWN="/bin/chown"
ADDUSER="/usr/sbin/adduser"

[ -d /var/run/xrdp ] || mkdir -p /var/run/xrdp
$ADDUSER --system --disabled-password --disabled-login --home /var/run/xrdp \
         --no-create-home --quiet --group $XRDP

$CHOWN -R $XRDP:$XRDP /etc/xrdp

if [ "$1" = "configure" ]; then
    if dpkg --compare-versions "$2" lt '0.4.0~dfsg-7'; then
        # We remove old keys
	[ -f /etc/xrdp/rsakeys.ini ] && rm /etc/xrdp/rsakeys.ini
    fi
fi


# Automatically added by dh_installinit
if [ -x "/etc/init.d/xrdp" ]; then
	update-rc.d xrdp defaults >/dev/null
fi
if [ -x "/etc/init.d/xrdp" ] || [ -e "/etc/init/xrdp.conf" ]; then
	invoke-rc.d xrdp start || exit $?
fi
# End automatically added section