This file is indexed.

postinst is in jetty8 8.1.19-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
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
#!/bin/sh
set -e

JETTY_USER=jetty
JETTY_GROUP=jetty

case "$1" in
    configure)
	# Install the default page if no root context exist
	if [ ! -f /var/lib/jetty8/webapps/root.war ]; then
		mkdir -p /var/lib/jetty8/webapps/root
		if [ -z "$(ls -A /var/lib/jetty8/webapps/root)" ]; then
			cp /usr/share/jetty8/default-root/* /var/lib/jetty8/webapps/root
		fi
	fi

	if ! id jetty > /dev/null 2>&1 ; then
	    adduser --system --home /usr/share/jetty8 --no-create-home \
		--group --disabled-password --shell /bin/false \
		$JETTY_USER
	fi
	chown -R jetty:adm /var/cache/jetty8 /var/log/jetty8 /var/lib/jetty8
	chmod 750 /var/log/jetty8

	# Authorize user jetty to open privileged ports via authbind.
	JETTY_UID="`id -u $JETTY_USER`"
	if [ ! -f "/etc/authbind/byuid/$JETTY_UID" ]; then
		if [ ! -d "/etc/authbind/byuid" ]; then
			mkdir -p /etc/authbind/byuid
			chmod 755 /etc/authbind
			chmod 755 /etc/authbind/byuid
		fi
		echo '0.0.0.0/0:1,1023' >/etc/authbind/byuid/$JETTY_UID
		echo '::/0,1-1023' >>/etc/authbind/byuid/$JETTY_UID
		chown $JETTY_USER:$JETTY_GROUP /etc/authbind/byuid/$JETTY_UID
		chmod 700 /etc/authbind/byuid/$JETTY_UID
	fi
    ;;

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

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

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